/* CoreXaPay v6.5 UI additions */
html[data-theme="light"]{
  --bg:#f7f5ff;--bg-soft:#ffffff;--sidebar:#ffffff;--panel:#ffffff;--panel-2:#f6f2ff;
  --line:#e7ddfb;--line-strong:#d4c5f4;--text:#24183b;--muted:#756889;
  --brand:#6f42c1;--brand-hover:#7d52cc;--success:#268a64;--warning:#ad7a1c;--danger:#c3475b;
  --shadow:0 16px 38px rgba(74,46,120,.10)
}
html[data-theme="light"] body{background:linear-gradient(180deg,#fbfaff 0%,#f4f0fc 100%);color:var(--text)}
html[data-theme="light"] .card{background:linear-gradient(180deg,#fff 0%,#fcfbff 100%);border-color:var(--line);box-shadow:var(--shadow)}
html[data-theme="light"] .sidebar{background:#fff;border-color:var(--line);box-shadow:10px 0 28px rgba(78,47,128,.06)}
html[data-theme="light"] .side-nav a{color:#665a79}
html[data-theme="light"] .side-nav a:hover,html[data-theme="light"] .side-nav a.active{background:#f1eaff;color:#5c32a3}
html[data-theme="light"] .input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff;color:#2a1f3b;border-color:#d9cef0}
html[data-theme="light"] .input:focus,html[data-theme="light"] select:focus,html[data-theme="light"] textarea:focus{border-color:#8f6bd1;box-shadow:0 0 0 3px rgba(111,66,193,.10)}
html[data-theme="light"] .code,html[data-theme="light"] .message,html[data-theme="light"] .verify-box{background:#faf8ff}
html[data-theme="light"] .btn{background:#fff;color:#382850;border-color:#d7c9ef}
html[data-theme="light"] .btn:hover{background:#f7f1ff;border-color:#b9a3df}
html[data-theme="light"] .btn.primary{background:#6f42c1;color:#fff;border-color:#6f42c1}
html[data-theme="light"] .btn.primary:hover{background:#7b4fca;border-color:#7b4fca}
html[data-theme="light"] .status.ok{background:#edf9f4;color:#227355;border-color:#b8e7d4}
html[data-theme="light"] .status.pending{background:#fff8e9;color:#8b661d;border-color:#efd99f}
html[data-theme="light"] .status.bad{background:#fff0f2;color:#a83a4d;border-color:#efbcc5}
html[data-theme="light"] .table th{color:#817390}
html[data-theme="light"] .table td,html[data-theme="light"] .table th{border-color:#eee7f7}
html[data-theme="light"] .notice{background:#fff8e8;color:#765719;border-color:#ead49e}
html[data-theme="light"] .cx-swal,html[data-theme="light"] .cx-toast{background:#fff!important;color:#24183b!important;border-color:#e3d8f4!important}
html[data-theme="light"] .swal2-title,html[data-theme="light"] .swal2-html-container{color:#24183b!important}
html[data-theme="light"] .site-footer{background:#fff;border-color:#e7ddfb}
html[data-theme="light"] .mobile-panel-bar{background:rgba(255,255,255,.95);border-color:#e5daf6}

.mobile-panel-bar,.sidebar-mobile-head{display:none}
.sidebar-theme{margin-top:auto;padding:18px 6px 4px;border-top:1px solid var(--line)}
.sidebar{display:flex;flex-direction:column}
.side-nav{flex:0 0 auto}
.theme-toggle{width:100%;margin-top:8px;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--panel-2);color:var(--text);cursor:pointer;font-weight:700}
.theme-toggle.compact{width:42px;height:42px;margin:0;padding:0;border-radius:11px}
.theme-icon{font-size:18px;line-height:1}

.withdrawal-form{display:grid;gap:18px}.withdrawal-preview{max-width:620px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--panel-2)}
.preview-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:8px 0;border-bottom:1px dashed var(--line)}
.preview-row:last-of-type{border-bottom:0}.preview-row.negative strong{color:#e17b87}.preview-row.total{margin-top:4px;padding-top:13px;font-size:17px}.preview-row.total strong{color:var(--success);font-size:20px}
.input-suffix{position:relative}.input-suffix .input{padding-right:46px}.input-suffix>span{position:absolute;right:13px;top:50%;transform:translateY(-50%);color:var(--muted);font-weight:700}.withdrawal-submit{width:max-content}
html[data-theme="light"] .withdrawal-preview{background:#faf7ff}.g-recaptcha{display:flex!important;justify-content:center!important;width:100%;margin:12px auto 4px}.g-recaptcha>div{margin:0 auto!important}

@media(max-width:850px){
  body{padding-top:68px}
  .mobile-panel-bar{display:flex;position:fixed;z-index:1200;left:0;right:0;top:0;height:68px;padding:0 15px;align-items:center;justify-content:space-between;background:rgba(8,17,29,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);box-shadow:0 8px 24px rgba(0,0,0,.12)}
  .mobile-brand{display:flex;align-items:center;justify-content:center;min-width:0}.mobile-brand .brand-logo{height:48px!important;max-width:190px!important}
  .mobile-menu-btn{width:44px;height:44px;border:1px solid var(--line-strong);border-radius:12px;background:var(--panel);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer}
  .mobile-menu-btn span{display:block;width:20px;height:2px;border-radius:2px;background:var(--text)}
  .mobile-spacer{width:44px}.sidebar-mobile-head{display:flex;align-items:center;justify-content:space-between;padding:0 4px 14px;margin-bottom:8px;border-bottom:1px solid var(--line)}
  .sidebar-close{width:36px;height:36px;border:1px solid var(--line);background:var(--panel-2);color:var(--text);border-radius:10px;font-size:24px;line-height:1;cursor:pointer}
  .layout{display:block!important;min-height:calc(100vh - 68px)}
  .sidebar{position:fixed!important;z-index:1300!important;left:0;top:0;width:min(330px,86vw)!important;height:100vh!important;padding:20px!important;transform:translateX(-105%);transition:transform .24s ease;overflow-y:auto;border-right:1px solid var(--line)!important;border-bottom:0!important}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .sidebar-overlay{display:block;position:fixed;z-index:1250;inset:0;background:rgba(4,8,15,.55);opacity:0;pointer-events:none;transition:opacity .24s ease;backdrop-filter:blur(2px)}
  body.sidebar-open .sidebar-overlay{opacity:1;pointer-events:auto}
  .side-nav{display:grid!important;grid-template-columns:1fr!important;margin-top:16px!important}
  .side-nav a{padding:12px 13px!important;font-size:14px!important}
  .content{padding:20px 16px 44px!important;min-width:0}
  .brand-box .brand-logo{height:54px!important;max-width:220px!important}
  .sidebar-theme{margin-top:20px}
}
@media(min-width:851px){.sidebar-overlay{display:none!important}}
@media(max-width:560px){.withdrawal-preview{padding:14px}.preview-row{font-size:13px}.preview-row.total{font-size:15px}.preview-row.total strong{font-size:18px}.withdrawal-submit{width:100%}}
