:root{--bg:#f2f4f7;--card:#fff;--text:#111827;--muted:#8b95a5;--line:#e7eaf0;--blue:#0789d1;--blue-soft:#e5f5ff;--green:#34b65a;--green-soft:#e6f9ec;--red:#f0525c;--red-soft:#ffe9eb;--orange:#f5a137;--orange-soft:#fff2dd;--purple:#8a69e8;--purple-soft:#eee9ff;--shadow:0 4px 14px rgba(27,43,66,.08);--radius:17px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}html[lang="km"] body{font-family:Battambang,Inter,sans-serif}button,input,select{font:inherit}button{color:inherit}.hidden{display:none!important}
.material-symbols-rounded{font-family:'Material Symbols Rounded';font-weight:normal;font-style:normal;font-size:22px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased;font-feature-settings:'liga'}
body.dark{--bg:#111827;--card:#1d2736;--text:#f8fafc;--muted:#9eabbc;--line:#303d4f;--shadow:0 4px 16px rgba(0,0,0,.2)}
.gate{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px;text-align:center}.gate-mark,.brand-mark{display:grid;place-items:center;background:linear-gradient(145deg,#0aa0ea,#0576c5);color:#fff;font-weight:900}.gate-mark{width:64px;height:64px;border-radius:21px;font-size:30px;box-shadow:0 10px 25px rgba(7,137,209,.25)}.gate-mark.error{background:var(--red)}.gate span{color:var(--muted);font-size:14px}.gate .primary-button{margin-top:12px;text-decoration:none}
.mini-app{min-height:100vh;padding-bottom:calc(86px + env(safe-area-inset-bottom))}.app-header{height:62px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;background:var(--card);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:38px;height:38px;border-radius:12px;font-size:19px}.brand div{display:flex;flex-direction:column}.brand strong{font-size:15px;letter-spacing:.02em}.brand small{font-size:11px;color:var(--muted);margin-top:2px}.round-button{width:39px;height:39px;border:0;border-radius:13px;background:var(--bg);font-size:18px;cursor:pointer}
.profile-strip{display:flex;align-items:center;gap:11px;padding:14px 16px;background:var(--card);border-bottom:1px solid var(--line);box-shadow:0 3px 10px rgba(35,50,70,.05);position:sticky;top:62px;z-index:19}.avatar{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#111827,#dc2737);border:2px solid var(--blue);color:#fff;font-weight:800;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}.profile-copy{min-width:0;display:flex;flex-direction:column;line-height:1.25}.profile-copy small{font-size:11px;color:var(--muted)}.profile-copy strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-copy span{font-size:11px;color:var(--muted)}.credit-chip{margin-left:auto;display:flex;align-items:center;gap:7px;background:var(--blue-soft);color:var(--blue);border-radius:99px;padding:9px 13px;font-size:14px}.credit-chip span{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,.package-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,.setting-icon{display:grid;place-items:center;font-weight:800;color:#fff}.stat-icon{width:37px;height:37px;border-radius:50%;font-size:17px}.blue{background:#58a9e7}.green{background:#48bb55}.red{background:#f0525c}.orange{background:#f5a137}.purple{background:#8a69e8}
.card{border-radius:var(--radius);padding:18px;margin-top:16px}.section-heading,.page-title,.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;grid-template-columns:1fr 112px;gap:11px;margin-top:17px}.quick-form label{display:flex;flex-direction:column;gap:7px}.quick-form label span{font-size:11px;font-weight:700;color:var(--muted)}.quick-form input,.quick-form select,.api-card input,.sheet-card input,.sheet-card select,.sheet-card textarea{width:100%;height:48px;border:1px solid #d7deea;border-radius:13px;background:var(--bg);color:var(--text);padding:0 13px;outline:none}.sheet-card textarea{height:90px;padding-top:12px;resize:vertical}.quick-form input:focus,.quick-form select:focus,.api-card input:focus,.sheet-card input:focus,.sheet-card select:focus,.sheet-card textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(7,137,209,.1)}.full{grid-column:1/-1}.primary-button{border:0;border-radius:13px;min-height:48px;background:linear-gradient(135deg,#0b99e0,#087ccb);color:#fff;font-weight:700;padding:0 17px;display:flex;align-items:center;justify-content:center;gap:10px;cursor:pointer}.primary-button b{font-size:19px}.section-title{margin:23px 3px 11px}.section-title h2{font-size:15px;margin:0}.section-title button,.text-button{border:0;background:none;color:var(--blue);font-size:12px;font-weight:700;cursor:pointer}
.transaction-list{display:flex;flex-direction:column;gap:10px}.transaction-item{border-radius:15px;padding:14px;display:grid;grid-template-columns:43px 1fr auto;gap:11px;align-items:center}.transaction-icon{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue);font-weight:800}.transaction-copy{min-width:0;display:flex;flex-direction:column;gap:4px}.transaction-copy strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.transaction-copy small{color:var(--muted);font-size:10px}.transaction-side{text-align:right;display:flex;flex-direction:column;gap:5px}.transaction-side strong{font-size:13px}.status{font-size:9px;font-weight:800;text-transform:uppercase;border-radius:7px;padding:4px 7px}.status.paid{color:#168a3b;background:var(--green-soft)}.status.pending{color:#bd6b00;background:var(--orange-soft)}.status.failed,.status.expired,.status.cancelled{color:#c83a45;background:var(--red-soft)}.empty{padding:25px;text-align:center;color:var(--muted);font-size:13px}
.balance-card{padding:25px;border-radius:22px;background:linear-gradient(135deg,#087fc9,#13a5ea);color:#fff;box-shadow:0 12px 28px rgba(7,137,209,.25);display:flex;flex-direction:column}.balance-card small{font-size:10px;letter-spacing:.13em;opacity:.85}.balance-card strong{font-size:42px;margin:7px 0}.balance-card span{font-size:11px;opacity:.78}.package-list{display:flex;flex-direction:column;gap:11px}.package-item{border-radius:16px;padding:15px;display:flex;align-items:center;gap:13px}.package-badge{width:46px;height:46px;border-radius:14px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;font-weight:900}.package-copy{display:flex;flex-direction:column;flex:1}.package-copy strong{font-size:14px}.package-copy small{font-size:11px;color:var(--muted);margin-top:3px}.soft-button{border:1px solid var(--line);background:var(--bg);border-radius:11px;min-height:38px;color:var(--blue);font-weight:700;padding:0 13px;cursor:pointer}
.page-title{margin:3px 2px 16px}.filter-row{display:flex;gap:7px;overflow:auto;padding-bottom:12px}.filter{border:1px solid var(--line);background:var(--card);border-radius:99px;padding:8px 14px;color:var(--muted);font-size:11px;font-weight:700}.filter.active{background:var(--blue);border-color:var(--blue);color:#fff}
.settings-group{border-radius:18px;margin-bottom:14px;overflow:hidden}.setting-row{width:100%;min-height:72px;padding:11px 12px;border:0;border-bottom:1px solid var(--line);background:var(--card);display:grid;grid-template-columns:42px minmax(104px,1fr) minmax(70px,1.05fr) 20px;align-items:center;gap:10px;text-align:left}.setting-row:last-child{border-bottom:0}.editable-setting{cursor:pointer}.editable-setting:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.setting-icon{width:40px;height:40px;border-radius:12px;font-size:21px}.setting-row>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.setting-row strong{font-size:14px}.setting-row small{font-size:10px;color:var(--muted);margin-top:3px}.setting-row>b{font-size:12px;color:var(--blue);text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.row-chevron,.row-lock{color:#b3bdca;font-size:19px}.tap-hint{font-size:10px;color:var(--muted);background:var(--card);border:1px solid var(--line);padding:6px 9px;border-radius:99px}.editable-setting.editing{background:color-mix(in srgb,var(--blue-soft) 35%,var(--card));cursor:default}.inline-setting-editor{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px 0 3px}.inline-setting-editor input,.inline-setting-editor select{width:100%;height:43px;border:1px solid #cfd9e6;border-radius:11px;background:var(--card);color:var(--text);padding:0 12px;outline:none}.inline-setting-editor input:focus,.inline-setting-editor select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(7,137,209,.1)}.inline-setting-editor>div{display:flex;gap:6px}.inline-setting-editor button{height:43px;border-radius:10px;padding:0 11px;font-size:11px;font-weight:700}.inline-cancel{border:1px solid var(--line);background:var(--card);color:var(--muted)}.inline-save{border:0;background:var(--blue);color:#fff}.admin-panel{margin-bottom:10px}.admin-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px}.admin-actions .full-action{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:7px;color:#168a3b;background:var(--green-soft)}.admin-actions .warning-action{color:#b96a00;background:var(--orange-soft)}.version-pill{font-size:11px;background:var(--blue-soft);color:var(--blue);padding:7px 11px;border-radius:99px}
.integration-hero{text-align:center;background:linear-gradient(155deg,var(--card),var(--blue-soft))}.integration-hero .section-icon{margin:0 auto}.integration-hero h2{font-size:21px;margin:12px 0 6px}.integration-hero p{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 15px}.integration-hero small{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin-top:10px}.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:13px}.security-card p{margin:4px 0 0;font-size:10px;line-height:1.55;color:#357048}.key-card{display:flex;align-items:center;justify-content:space-between;gap:12px}.key-card small{font-size:9px;color:var(--muted);font-weight:800;letter-spacing:.1em}.key-card h3{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;margin:5px 0 0}.api-flow{display:grid;gap:0}.api-card{margin-top:12px}.api-title{display:flex;align-items:center;gap:9px;overflow:hidden}.api-title span{font-family:Inter,sans-serif;font-size:9px;padding:5px 8px;background:var(--blue);color:#fff;border-radius:6px;font-weight:800}.api-title.post span{background:var(--green)}.api-title code{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.api-card p{font-size:11px;line-height:1.55;color:var(--muted)}.api-card form{display:grid;grid-template-columns:1fr 48px;gap:8px}.square-button{border:0;border-radius:12px;background:var(--blue);color:#fff;display:grid;place-items:center}.api-card pre,.secret-once pre{background:#111a2d;color:#61dafb;padding:16px;border-radius:13px;min-height:80px;overflow:auto;font-size:11px;word-break:break-all;white-space:pre-wrap}.secret-once{text-align:center;align-items:stretch}.secret-once>span{font-size:42px;color:var(--blue);text-align:center}.secret-once p{font-size:11px;color:var(--muted);line-height:1.55}
.api-token-setting{cursor:pointer}.inline-api-token-editor{grid-column:1/-1;padding:12px 0 3px}.api-token-status,.api-token-success{display:flex;align-items:center;gap:10px;padding:11px;border-radius:12px;background:var(--blue-soft);color:var(--blue)}.api-token-status>span,.api-token-success>span{font-size:25px}.api-token-status>div,.api-token-success{min-width:0}.api-token-status strong,.api-token-success strong{display:block;font-size:12px}.api-token-status small,.api-token-success small{display:block;color:var(--muted);font-size:9px;word-break:break-all}.inline-api-token-editor>p{font-size:10px;line-height:1.55;color:var(--muted);margin:10px 2px}.inline-api-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px}.inline-api-actions button{min-height:42px;border-radius:11px;font-size:11px;font-weight:700}.inline-api-token-editor pre{background:#111a2d;color:#61dafb;border-radius:12px;padding:13px;word-break:break-all;white-space:pre-wrap;font-size:10px}.inline-api-token-editor .primary-button{margin-top:8px}.integration-hero .eyebrow{margin:12px 0 0;color:var(--blue);font-weight:800;letter-spacing:.12em}.platform-pills{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin:0 0 15px}.platform-pills span{font-size:9px;font-weight:700;padding:6px 9px;border-radius:99px;background:var(--card);border:1px solid var(--line);color:var(--muted)}.integration-steps{display:grid;gap:8px;margin-top:14px}.integration-steps article{display:flex;align-items:center;gap:11px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--card)}.integration-steps article>span{width:29px;height:29px;border-radius:9px;display:grid;place-items:center;background:var(--blue);color:#fff;font-weight:800;font-size:11px}.integration-steps article>div{display:flex;flex-direction:column;gap:2px}.integration-steps strong{font-size:12px}.integration-steps small{font-size:9px;color:var(--muted)}.key-card>div{min-width:0}.key-card h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.key-card>div>span{display:block;color:var(--muted);font-size:9px;margin-top:4px}.key-card .soft-button{display:flex;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;font-size:10px}.key-card .soft-button span{font-size:17px}.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:9px;color:var(--muted);font-weight:800;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}.api-section-title{margin-bottom:0}.api-section-title>span{font-size:9px;color:#168a3b;background:var(--green-soft);border-radius:99px;padding:5px 8px;font-weight:700}.api-flow .api-card{box-shadow:none}.api-flow .api-card:hover{border-color:#b9dcef}
.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)}body.dark .bottom-nav{background:rgba(29,39,54,.96)}.nav-button{border:0;background:transparent;color:#9aa8ba;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.nav-button span{font-size:20px;line-height:1}.nav-button b{font-size:9px}.nav-button.active{color:var(--blue)}
.sheet{position:fixed;z-index:50;inset:0}.sheet-backdrop{position:absolute;inset:0;background:rgba(10,20,35,.48);backdrop-filter:blur(2px)}.sheet-card{position:absolute;left:0;right:0;bottom:0;max-height:88vh;overflow:auto;background:var(--card);border-radius:24px 24px 0 0;padding:20px 18px calc(22px + env(safe-area-inset-bottom));text-align:center}.sheet-handle{width:42px;height:4px;border-radius:99px;background:#cbd3dd;margin:-8px auto 17px}.sheet-close{position:absolute;right:16px;top:15px;width:34px;height:34px;border:0;border-radius:10px;background:var(--bg);font-size:20px}.sheet-card>small{font-size:10px;letter-spacing:.13em;color:var(--blue);font-weight:800}.sheet-card h2{font-size:28px;margin:9px}.payment-qr{width:min(250px,75vw);aspect-ratio:1;border:1px solid var(--line);border-radius:16px;margin:7px auto 13px;display:block}.sheet-card>strong{display:block;font-size:14px}.sheet-card>span{display:block;color:var(--muted);font-size:11px;margin-top:7px}.sheet-form{display:flex;flex-direction:column;gap:12px;text-align:left}.sheet-form h2{font-size:20px;margin:0 0 5px}.sheet-form label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:var(--muted)}.sheet-form .primary-button{margin-top:5px}.admin-table{display:flex;flex-direction:column;gap:8px;margin-top:12px}.admin-row{display:flex;align-items:center;gap:10px;padding:11px;background:var(--bg);border-radius:12px;text-align:left}.admin-row>div{flex:1;min-width:0;display:flex;flex-direction:column}.admin-row strong{font-size:12px}.admin-row small{font-size:10px;color:var(--muted)}.admin-row button{border:0;background:var(--red-soft);color:var(--red);border-radius:8px;padding:7px;font-size:10px}.toast{position:fixed;z-index:70;left:50%;bottom:90px;transform:translateX(-50%);max-width:90%;background:#111827;color:#fff;border-radius:12px;padding:11px 15px;font-size:12px;box-shadow:0 8px 25px rgba(0,0,0,.2)}
.token-summary{padding:14px;border-radius:13px;background:var(--blue-soft);color:var(--blue);display:flex;flex-direction:column;gap:4px}.token-summary strong{font-size:14px}.token-summary small{font-size:11px}.admin-row small{line-height:1.55}.admin-row-actions{flex:0 0 auto!important;display:flex!important;flex-direction:column!important;gap:5px}.admin-row .renew-token{background:var(--green-soft);color:var(--green)}
@media(min-width:620px){.bottom-nav{left:50%;max-width:620px;transform:translateX(-50%);border-left:1px solid var(--line);border-right:1px solid var(--line)}.app-header,.profile-strip{max-width:620px;margin:0 auto}.sheet-card{max-width:620px;margin:auto}.page{padding-left:18px;padding-right:18px}}
.inline-api-actions{grid-template-columns:repeat(2,1fr)}.inline-api-actions button:disabled,.key-card-actions button:disabled{opacity:.45;cursor:not-allowed}.danger-soft{border:1px solid #f3b8be;background:var(--red-soft);color:#c83a45}.api-token-status.revoked{background:var(--red-soft);color:#c83a45}.key-card{align-items:flex-start;flex-direction:column}.key-card-actions{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.key-card-actions .soft-button{padding:0 8px;min-height:40px}.key-card-actions .danger-soft{color:#c83a45}@media(max-width:390px){.key-card-actions{grid-template-columns:1fr 1fr}.key-card-actions button:last-child{grid-column:1/-1}}
