:root{color-scheme:light;--bg:#f2f4f7;--card:#fff;--text:#172033;--muted:#7c8899;--line:#e3e8ef;--blue:#0789d1;--blue-soft:#e9f6fd;--green:#28a745;--green-soft:#eaf8ee;--orange:#f5a137;--red:#d53a48;--red-soft:#fff0f2;--shadow:0 10px 28px rgba(29,48,75,.07);--radius:18px}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;min-height:100vh;background:var(--bg);color:var(--text);font-family:Inter,Battambang,"Noto Sans Khmer",system-ui,sans-serif}
.hidden{display:none!important}
button,input,select,textarea{font:inherit}
.material-symbols-rounded{font-variation-settings:"FILL" 0,"wght" 500,"GRAD" 0,"opsz" 24}
.gate-card{width:min(430px,calc(100% - 28px));margin:9vh auto;padding:34px 25px;background:var(--card);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);text-align:center}
.gate-mark,.brand-mark{display:grid;place-items:center;background:linear-gradient(145deg,#19a8ed,#087bc7);color:#fff;font-weight:850;box-shadow:0 8px 18px rgba(7,137,209,.24)}
.gate-mark{width:62px;height:62px;margin:0 auto 12px;border-radius:20px;font-size:30px}
.gate-card>strong{display:block;font-size:23px}
.gate-card>span,.gate-card>p{color:var(--muted)}
.gate-card>span{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;margin-top:3px}
.gate-card>p{font-size:12px;line-height:1.7;margin:18px 0}
.gate-card form,.sheet-form{display:grid;gap:12px}
.mini-app{min-height:100vh;padding-bottom:calc(82px + env(safe-area-inset-bottom))}
.app-header{height:62px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;backdrop-filter:blur(14px)}
.brand{display:flex;align-items:center;gap:10px}
.brand-mark{width:38px;height:38px;border-radius:12px;font-size:19px}
.brand div,.profile-copy{display:flex;flex-direction:column}
.brand strong{font-size:15px;letter-spacing:.02em}
.brand small{font-size:10px;color:var(--muted);margin-top:2px}
.header-actions{display:flex;align-items:center;gap:8px}
.health{display:flex;align-items:center;gap:6px;padding:7px 9px;background:var(--bg);border-radius:99px}
.health i{width:7px;height:7px;border-radius:50%;background:var(--orange)}
.health i.ok{background:#2abf5a}
.health i.bad{background:var(--red)}
.health b{font-size:9px;color:var(--muted);font-weight:700}
.round-button{width:39px;height:39px;border:0;border-radius:13px;background:var(--bg);color:var(--text);display:grid;place-items:center;cursor:pointer}
.profile-strip{padding:15px 16px;display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:11px;background:var(--card);border-bottom:1px solid var(--line)}
.avatar{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#0b9be1,#066db2);color:#fff;font-weight:800;font-size:18px}
.profile-copy small,.profile-copy span{font-size:10px;color:var(--muted)}
.profile-copy strong{font-size:14px;margin:2px 0}
.server-chip{height:29px;padding:0 10px;display:flex;align-items:center;gap:5px;background:var(--green-soft);color:#23813b;border-radius:99px}
.server-chip span{font-size:9px}
.server-chip strong{font-size:9px}
.page-wrap{max-width:620px;margin:0 auto}
.page{display:none;padding:18px 14px 8px}
.page.active{display:block}
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat-card,.card,.settings-group,.transaction-item,.shop-item{background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}
.stat-card{border-radius:16px;padding:14px 8px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:7px}
.stat-card strong{font-size:17px}
.stat-card small{font-size:10px;color:var(--muted)}
.stat-icon{width:37px;height:37px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:18px}
.blue{background:#58a9e7}
.green{background:#48bb55}
.orange{background:#f5a137}
.card{border-radius:var(--radius);padding:18px;margin-top:16px}
.section-heading,.page-title,.section-title,.api-section-title{display:flex;align-items:center;justify-content:space-between}
.section-heading small,.page-title small{color:var(--blue);font-size:10px;font-weight:800;letter-spacing:.1em}
.section-heading h2,.page-title h1{margin:4px 0 0;font-size:20px}
.section-icon{width:42px;height:42px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue);border-radius:13px}
.quick-form{display:grid;gap:10px;margin-top:16px}
.payment-method-row{display:grid;grid-template-columns:minmax(95px,1.2fr) 78px auto 24px;align-items:center;gap:8px;padding:10px;border:1.5px solid var(--line);border-radius:15px;background:var(--bg);cursor:pointer;transition:.18s}
.payment-method-row.selected{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 0 0 3px rgba(7,137,209,.08)}
.provider-radio{position:absolute;opacity:0;pointer-events:none}
.payment-brand{display:flex;align-items:center;gap:8px;min-width:0}
.payment-brand img{width:34px;height:34px;border-radius:9px;object-fit:contain;background:#fff}
.payment-brand>span{display:flex;min-width:0;flex-direction:column}
.payment-brand strong{font-size:11px}
.payment-brand small{font-size:8px;color:var(--muted)}
.method-amount input{height:38px!important;padding:0 9px!important;text-align:center;font-size:12px}
.currency-checks{display:flex;gap:3px}
.currency-checks label{cursor:pointer}
.currency-checks input{position:absolute;opacity:0}
.currency-checks b{display:block;padding:6px 7px;border-radius:8px;background:var(--card);color:var(--muted);font-size:8px;border:1px solid var(--line)}
.currency-checks input:checked+b{background:var(--blue);color:#fff;border-color:var(--blue)}
.method-check{color:#9aa8ba;font-size:21px}
.selected .method-check{color:var(--blue)}
.shop-selector-row{display:grid;grid-template-columns:25px 1fr;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--line);border-radius:13px;background:var(--bg)}
.shop-selector-row>span{color:var(--blue)}
.shop-selector-row select{border:0!important;background:transparent!important;box-shadow:none!important}
.primary-button{border:0;border-radius:13px;min-height:48px;background:linear-gradient(135deg,#0b99e0,#087ccb);color:#fff;font-weight:750;padding:0 17px;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer}
.primary-button:disabled{opacity:.55;cursor:wait}
.full{width:100%}
.section-title{margin:23px 3px 11px}
.section-title h2,.api-section-title h2{font-size:15px;margin:0}
.section-title button{border:0;background:none;color:var(--blue);font-size:12px;font-weight:700;cursor:pointer}
.transaction-list,.shop-list,.token-list{display:grid;gap:9px}
.transaction-item,.shop-item{border-radius:15px;padding:13px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.transaction-main,.shop-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.transaction-main strong,.shop-main strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.transaction-main small,.shop-main small{font-size:9px;line-height:1.5;color:var(--muted)}
.status-chip{display:inline-flex;padding:5px 8px;border-radius:99px;font-size:8px;font-weight:850;text-transform:uppercase;background:var(--red-soft);color:var(--red)}
.status-chip.active,.status-chip.paid{background:var(--green-soft);color:#25813d}
.status-chip.pending{background:#fff6dc;color:#a66a00}
.page-intro{font-size:11px;line-height:1.65;color:var(--muted)}
.txn-summary-card{margin:16px 0 10px;padding:16px;border-radius:17px;background:linear-gradient(135deg,#0b97dd,#066cb3);color:#fff;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;box-shadow:0 12px 28px rgba(7,137,209,.22)}
.txn-sum-icon{font-size:30px}
.txn-summary-card div{display:flex;flex-direction:column}
.txn-summary-card small{font-size:9px;opacity:.8}
.txn-summary-card strong{font-size:15px;margin-top:2px}
.txn-summary-card .status-chip{background:rgba(255,255,255,.18);color:#fff}
.txn-filter-bar{margin-bottom:10px}
.txn-filter-bar select{background:var(--card)}
label{display:flex;flex-direction:column;gap:6px;text-align:left;font-size:10px;font-weight:700;color:var(--muted)}
input,select,textarea{width:100%;height:46px;border:1px solid #d7deea;border-radius:12px;background:var(--bg);color:var(--text);padding:0 12px;outline:0}
input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(7,137,209,.1)}
.method-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.method-options label{display:flex;flex-direction:row;align-items:center;padding:11px;border:1px solid var(--line);border-radius:12px;background:var(--bg);font-size:10px}
.method-options input{width:auto;height:auto}
.secret,.api-card pre{background:#111a2d;color:#61dafb;padding:14px;border-radius:13px;overflow:auto;font-size:10px;line-height:1.55;word-break:break-all;white-space:pre-wrap}
.settings-section-title{margin:17px 3px 9px;display:grid;grid-template-columns:28px 1fr;gap:0 7px;align-items:center}
.settings-section-title>span{grid-row:1/3;color:var(--blue)}
.settings-section-title strong{font-size:12px}
.settings-section-title small{font-size:9px;color:var(--muted)}
.settings-group{border-radius:17px;overflow:hidden}
.setting-row{min-height:65px;padding:11px 13px;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:10px;border-bottom:1px solid var(--line)}
.setting-row:last-child{border-bottom:0}
.setting-row img{width:38px;height:38px;object-fit:contain;border-radius:10px}
.setting-row>span:not(.material-symbols-rounded){display:flex;flex-direction:column}
.setting-row strong{font-size:12px}
.setting-row small{font-size:9px;color:var(--muted);margin-top:3px}
.setup-badge,.version-pill{padding:5px 8px;border-radius:99px;background:var(--green-soft);color:#25813d;font-size:8px;font-weight:800}
.token-card>p{font-size:11px;line-height:1.65;color:var(--muted)}
.token-list{margin-top:14px}
.token-item{padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--bg)}
.token-item-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.token-item strong{font-size:11px}
.token-item small{display:block;font-size:9px;line-height:1.55;color:var(--muted);margin-top:4px}
.token-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
.soft-button,.token-actions button{min-height:39px;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--blue);font-weight:700;font-size:10px;cursor:pointer}
.security-card{display:flex;gap:12px;align-items:flex-start;border-color:#bce7ca;background:var(--green-soft);box-shadow:none}
.security-card>span{color:#168a3b;font-size:27px}
.security-card strong{font-size:12px}
.security-card p{margin:4px 0 0;font-size:9px;line-height:1.55;color:#357048}
.logout-button{width:100%;margin-top:12px;color:var(--red);display:flex;align-items:center;justify-content:center;gap:7px}
.integration-hero{text-align:center;background:linear-gradient(155deg,var(--card),var(--blue-soft))}
.integration-hero>.section-icon{margin:0 auto}
.integration-hero .eyebrow{display:block;margin:12px 0 0;color:var(--blue);font-size:9px;font-weight:850;letter-spacing:.12em}
.integration-hero h2{font-size:21px;margin:9px 0 6px}
.integration-hero>p{font-size:11px;line-height:1.65;color:var(--muted);margin:0 0 14px}
.platform-pills{display:flex;justify-content:center;flex-wrap:wrap;gap:6px}
.platform-pills span{font-size:8px;font-weight:700;padding:6px 8px;border-radius:99px;background:var(--card);border:1px solid var(--line);color:var(--muted)}
.provider-prompt-block{display:flex;flex-direction:column;gap:8px;margin-top:13px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}
.provider-prompt-block .integration-copy-button{font-size:10px}
.base-url-card{display:flex;align-items:center;justify-content:space-between;gap:10px}
.base-url-card>div{min-width:0;display:flex;flex-direction:column;gap:6px}
.base-url-card small{font-size:8px;color:var(--muted);font-weight:850;letter-spacing:.1em}
.base-url-card code{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--blue)}
.icon-copy{width:39px;height:39px;flex:0 0 39px;border:0;border-radius:11px;background:var(--blue-soft);color:var(--blue);display:grid;place-items:center;cursor:pointer}
.api-section-title{margin:22px 3px 0}
.api-section-title>span{font-size:8px;color:#168a3b;background:var(--green-soft);border-radius:99px;padding:5px 8px;font-weight:800}
.api-flow{display:grid}
.api-flow .api-card{margin-top:10px;box-shadow:none}
.api-title{display:flex;align-items:center;gap:9px;overflow:hidden}
.api-title span{font-size:8px;padding:5px 8px;background:var(--blue);color:#fff;border-radius:6px;font-weight:850}
.api-title.post span{background:var(--green)}
.api-title code{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.api-card p{font-size:10px;line-height:1.6;color:var(--muted)}
.api-card pre{min-height:0}
.bottom-nav{position:fixed;z-index:30;left:0;right:0;bottom:0;height:calc(70px + env(safe-area-inset-bottom));padding:6px 8px env(safe-area-inset-bottom);background:rgba(255,255,255,.96);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);backdrop-filter:blur(14px)}
.nav-button{border:0;background:transparent;color:#9aa8ba;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}
.nav-button span{font-size:20px;line-height:1}
.nav-button b{font-size:9px}
.nav-button.active{color:var(--blue)}
.sheet{position:fixed;inset:0;z-index:50;display:grid;align-items:end}
.sheet-backdrop{position:absolute;inset:0;background:rgba(8,17,31,.52);backdrop-filter:blur(2px)}
.sheet-card{position:relative;width:100%;max-height:92vh;overflow:auto;padding:22px 18px calc(22px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:var(--card);box-shadow:0 -20px 55px rgba(0,0,0,.18)}
.sheet-handle{width:42px;height:4px;border-radius:9px;background:#ced5df;margin:-10px auto 14px}
.sheet-close{position:absolute;right:14px;top:13px;width:34px;height:34px;border:0;border-radius:50%;background:var(--bg);color:var(--text);font-size:22px}
.payment-sheet-card{text-align:center}
.payment-sheet-card img{display:block;width:min(330px,90%);margin:15px auto;border-radius:17px;background:#fff;padding:10px}
.payment-sheet-card h2{margin:5px 0}
.payment-sheet-card p{font-size:11px;color:var(--muted)}
.payment-sheet-card a{color:var(--blue);font-weight:800}
.toast{position:fixed;z-index:80;left:50%;bottom:calc(82px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 28px);padding:11px 16px;border-radius:12px;background:#172033;color:#fff;font-size:11px;box-shadow:0 10px 28px rgba(0,0,0,.2)}
body.dark{color-scheme:dark;--bg:#131b26;--card:#1d2736;--text:#eef4fb;--muted:#9aa8ba;--line:#2d3b4d;--blue-soft:#17344a;--green-soft:#193726;--red-soft:#43232a;--shadow:0 10px 28px rgba(0,0,0,.2)}
body.dark .app-header,body.dark .bottom-nav{background:rgba(29,39,54,.96)}
body.dark .payment-brand img{background:#fff}
@media(min-width:620px){.app-header,.profile-strip,.bottom-nav{left:50%;max-width:620px;transform:translateX(-50%);width:100%}
.sheet-card{max-width:620px;margin:auto}
.page{padding-left:18px;padding-right:18px}
}
@media(max-width:410px){.payment-method-row{grid-template-columns:minmax(88px,1fr) 70px auto 20px;gap:5px;padding:8px}
.payment-brand img{width:30px;height:30px}
.currency-checks b{padding:5px}
.health b{display:none}
}
.grid-form.compact{display:grid}
.checkout-body{display:grid;place-items:center;padding:25px}
.checkout-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:25px;padding:28px;text-align:center;box-shadow:var(--shadow);color:#172033}
.checkout-logo{height:45px}
.checkout-qr{display:block;width:100%;max-width:340px;margin:16px auto;background:#fff;border-radius:15px;padding:8px}
.checkout-card h1{margin-bottom:5px}
.checkout-card .status-chip{margin:8px}
.muted{color:var(--muted)}
