/* DigiKray mobile app layer (1 Nov 2026). Loaded last in panel-shell, after dk-ui.css.
   Phone widths only (<=768px) plus the install/update UI; desktop rules are not touched. */

/* ---------- install sheet + update bars (all widths) ---------- */
.dk-install{position:fixed;inset:0;z-index:40000;display:flex;align-items:flex-end;justify-content:center;pointer-events:none}
.dk-install-backdrop{position:absolute;inset:0;background:rgba(2,6,12,.55);opacity:0;transition:opacity .2s;pointer-events:auto}
.dk-install-card{position:relative;width:min(100%,460px);margin:0 10px calc(10px + env(safe-area-inset-bottom));padding:18px 18px 14px;border-radius:22px;background:var(--surface,#131e2c);color:var(--text-primary,#f5f3ee);border:1px solid var(--border,rgba(230,237,244,.12));box-shadow:0 -10px 40px rgba(0,0,0,.4);transform:translateY(110%);transition:transform .25s cubic-bezier(.2,.8,.2,1);pointer-events:auto}
/* Older global rules restyle every [role=dialog] (inset:auto, width, padding); the sheet keeps its own box. */
html body #dkInstallSheet{position:fixed!important;inset:0!important;width:auto!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
.dk-install.show .dk-install-backdrop{opacity:1}.dk-install.show .dk-install-card{transform:none}
.dk-install-head{display:flex;align-items:center;gap:12px}.dk-install-head img{width:56px;height:56px;border-radius:14px;flex:0 0 56px}
.dk-install-head b{display:block;font-size:17px;line-height:1.25}.dk-install-head small{display:block;color:var(--text-secondary,#b5bfca);font-size:12.5px;margin-top:2px}
.dk-install-text{margin:12px 0 14px;color:var(--text-secondary,#b5bfca);font-size:14px;line-height:1.5}
.dk-install-ios ol{margin:0 0 14px;padding-left:20px;font-size:14px;line-height:1.7}
.dk-install-actions{display:grid;grid-template-columns:1fr auto;gap:10px}
.dk-install-actions button{min-height:48px!important;border-radius:12px!important;font-size:15px!important;font-weight:700!important;padding:0 16px!important;width:auto!important;margin:0!important}
.dk-install-go{background:var(--accent,#19a8b6)!important;color:#fff!important;border:0!important}
.dk-install-later{background:transparent!important;color:var(--text-secondary,#b5bfca)!important;border:1px solid var(--border,rgba(230,237,244,.15))!important}
.dk-install-apk{display:block;margin-top:12px;text-align:center;font-size:13px;color:var(--accent,#19a8b6);text-decoration:none}
.dk-app-bar{position:fixed;left:10px;right:10px;top:calc(10px + env(safe-area-inset-top));z-index:39000;display:flex;align-items:center;gap:12px;max-width:560px;min-height:76px;margin:0 auto;padding:14px 10px 14px 14px;border-radius:18px;background:linear-gradient(135deg,#0e7490,#0787ff);color:#fff;line-height:1.3;box-shadow:0 14px 34px rgba(0,0,0,.45),inset 0 0 0 2px rgba(255,255,255,.16);transform:translateY(-140%);transition:transform .25s}
.dk-app-bar.show{transform:none}
/* Update icon (bar and menu row): a white ring that pulses so the update is noticed. */
.dk-app-bar-ic{flex:0 0 40px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:20px;font-weight:800;background:rgba(255,255,255,.2);color:#fff;animation:dkPulse 1.8s ease-out infinite}
@keyframes dkPulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.55)}100%{box-shadow:0 0 0 12px rgba(255,255,255,0)}}
@media (prefers-reduced-motion:reduce){.dk-app-bar-ic{animation:none}}
.dk-app-bar-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.dk-app-bar-txt b{font-size:16.5px;font-weight:800}
.dk-app-bar-txt small{font-size:13.5px;opacity:.92}
.dk-app-bar button{min-height:44px!important;height:44px!important;width:auto!important;margin:0!important;border-radius:12px!important;font-size:15px!important;font-weight:800!important;box-shadow:none!important}
.dk-app-bar-go{padding:0 16px!important;background:#fff!important;color:#0763c4!important;border:0!important}
/* "Update available" row at the top of the menu (phone Profile sheet and computer sidebar). */
html body .side .nav a#dkUpdateLink{display:flex!important;align-items:center;gap:12px;margin:0 0 10px!important;padding:12px 14px!important;min-height:64px;border-radius:14px!important;border:0!important;background:linear-gradient(135deg,#0e7490,#0787ff)!important;color:#fff!important;text-decoration:none!important;white-space:normal!important}
html body .side .nav a#dkUpdateLink b{display:block;font-size:15.5px;font-weight:800;color:#fff}
html body .side .nav a#dkUpdateLink small{display:block;font-size:12.5px;opacity:.9;color:#fff}
/* Red dot on the Profile tab, the avatar and the menu button while an update waits. */
html.dk-has-update .bottom-nav [data-bottom-drawer-toggle],html.dk-has-update #profileMenuButton,html.dk-has-update .top .menu-toggle{position:relative!important;overflow:visible!important}
html.dk-has-update .bottom-nav [data-bottom-drawer-toggle]::before,html.dk-has-update #profileMenuButton::before,html.dk-has-update .top .menu-toggle::before{content:'';position:absolute;top:2px;right:2px;width:11px;height:11px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 2px var(--page-bg,#0b111b);z-index:2;pointer-events:none}
html.dk-has-update .bottom-nav [data-bottom-drawer-toggle]::before{right:calc(50% - 20px);top:6px}
/* The phone menu's account header and theme row are not needed in the computer sidebar. */
@media (min-width:769px){html body .side .dk-sheet-head,html body .side .dk-sheet-row{display:none!important}}
/* App download on the website: sidebar entry (computers) and the button under the login / register form. */
html body .side .nav a.dk-install-link{display:flex!important;align-items:center;gap:10px;margin:8px 0 4px!important;padding:10px 14px!important;border-radius:12px!important;background:rgba(25,168,182,.12)!important;border:1px solid rgba(25,168,182,.3)!important;color:inherit!important;text-decoration:none!important;font-weight:700}
.dk-auth-app{display:flex;align-items:center;gap:12px;margin:16px 0 0;padding:12px 14px;border-radius:14px;border:1px solid rgba(25,168,182,.4);background:rgba(25,168,182,.1);color:inherit;text-decoration:none}
.dk-auth-app>span:first-child{font-size:26px;line-height:1}
.dk-auth-app b{display:block;font-size:15px;font-weight:800}
.dk-auth-app small{display:block;font-size:12.5px;opacity:.8}
.dk-app-bar-x{padding:0 10px!important;background:transparent!important;color:#fff!important;border:0!important;font-size:22px!important;line-height:1!important}
/* On phones the update bar opens below the app top bar, so the title, bell and avatar stay visible. */
@media (max-width:768px){html.dk-m .dk-app-bar{top:calc(66px + env(safe-area-inset-top));transform:translateY(-12px);opacity:0;pointer-events:none;transition:transform .25s,opacity .25s}html.dk-m .dk-app-bar.show{transform:none;opacity:1;pointer-events:auto}
 html.dk-m body .content .password-field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]){padding-right:78px!important}
 html.dk-m body .content td form{min-width:0!important}
 html.dk-m body .content .approval-row b{white-space:normal!important}}
/* Inside the installed app there is no browser bar, so give the top a safe-area inset. */
html.dk-standalone .top{padding-top:env(safe-area-inset-top)!important}

@media (max-width:768px){
 /* ---------- shell: fixed header, drawer, bottom nav ---------- */
 html,body{overflow-x:hidden!important}
 html.dk-m body .main{overflow:visible!important}
 html.dk-m body .top{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;height:calc(60px + env(safe-area-inset-top))!important;min-height:0!important;margin:0!important;padding:env(safe-area-inset-top) 10px 0!important;border-radius:0 0 16px 16px!important;border-top:0!important;border-left:0!important;border-right:0!important;z-index:900!important;transform:none!important}
 html.dk-m body .content,html.dk-m body.role-user .content{padding:calc(72px + env(safe-area-inset-top)) 12px calc(96px + env(safe-area-inset-bottom))!important;animation:none!important}
 html.dk-m body .page-title{font-size:16px!important;max-width:calc(100vw - 210px)!important}
 html.dk-m body .mobile-brand{font-size:10px!important;letter-spacing:.1em!important}
 /* Drawer opens fully on screen, below the header, above the bottom nav. */
 html.dk-m body .side{position:fixed!important;top:calc(60px + env(safe-area-inset-top))!important;bottom:0!important;left:0!important;right:auto!important;inset:calc(60px + env(safe-area-inset-top)) auto 0 0!important;width:min(84vw,320px)!important;max-width:320px!important;height:auto!important;margin:0!important;border-radius:0 18px 0 0!important;padding:16px 14px calc(110px + env(safe-area-inset-bottom))!important;transform:translateX(-110%)!important;transition:transform .24s ease!important;z-index:1150!important;overflow-y:auto!important;overscroll-behavior:contain}
 html.dk-m body .side.open{transform:translateX(0)!important}
 html.dk-m body .overlay{display:block!important;position:fixed!important;inset:calc(60px + env(safe-area-inset-top)) 0 0 0!important;z-index:1140!important;background:rgba(2,6,12,.55)!important}
 html.dk-m body .side .brand img{max-width:170px!important;max-height:44px!important}
 html.dk-m body .side .nav a{min-height:44px!important;font-size:14px!important}
 html.dk-m body .bottom-nav{z-index:1100!important}
 body:has(.side.open) .bottom-nav{z-index:1160!important}
 /* Profile dropdown under the avatar never runs off the right edge. */
 html.dk-m body .profile-dropdown{position:fixed!important;top:calc(64px + env(safe-area-inset-top))!important;right:10px!important;left:auto!important;width:min(240px,calc(100vw - 20px))!important}

 /* ---------- data grids as clean cards ---------- */
 html.dk-m body .edg table.enterprise-mobile tbody td:nth-child(even):last-child{grid-column:1/-1!important}
 html.dk-m body .edg-footer{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:10px 12px!important;text-align:left!important}
 html.dk-m body .edg-footer>*{width:auto!important;margin:0!important}
 html.dk-m body .edg-footer select{min-height:36px!important;height:36px!important;width:auto!important;padding:0 28px 0 10px!important;font-size:13px!important}
 html.dk-m body .edg-footer button{min-height:36px!important;height:36px!important;min-width:36px!important;width:auto!important;padding:0 8px!important;font-size:13px!important}
 html.dk-m body .edg-pages{display:flex!important;gap:4px!important;flex-wrap:nowrap!important}

 /* ---------- wide content scrolls inside its card, never the page ---------- */
 html.dk-m body .content :is(.tree-wrap,.tree-scroll,.binary-tree,.tree-canvas,.org-tree,.tree,.placement-tree,.tradingview-widget-container,.chart-zone){max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
 html.dk-m body .content pre{max-width:100%;overflow-x:auto}
 html.dk-m body .content iframe{max-width:100%!important}
 html.dk-m body .content img{height:auto}

 /* ---------- cards, headings, forms ---------- */
 html.dk-m body .content h1{font-size:24px!important;line-height:1.2!important}
 html.dk-m body .content h2{font-size:19px!important;line-height:1.25!important}
 html.dk-m body .content h3{font-size:16.5px!important;line-height:1.3!important}
 html.dk-m body .content :is(.card,.panel,.hub-item,.hub-head,.stat-card,.ent-panel,.ent-hero,.e-card,.setting-card,.table-card){border-radius:18px!important}
 html.dk-m body .content label{font-size:13.5px}
 html.dk-m body .content .actions,html.dk-m body .content .form-actions{gap:8px!important}
 html.dk-m body .content input[type=checkbox],html.dk-m body .content input[type=radio]{width:20px!important;height:20px!important;min-height:0!important;flex:0 0 20px}
}
@media (max-width:768px){
 /* ---------- app-style page structure (classes set by dk-app.js) ---------- */
 html.dk-m body .content .dk-flat{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;padding:0!important;border-radius:0!important;backdrop-filter:none!important;overflow:visible!important}
 html.dk-m body .content .dk-flat:before{display:none!important}
 html.dk-m body .content .dk-flat>*+*{margin-top:12px}
 html.dk-m body .content .dk-nest{padding:12px!important;border-radius:14px!important;box-shadow:none!important}
 html.dk-m body .content .dk-amt{white-space:nowrap!important;overflow-wrap:normal!important;flex-shrink:0!important;max-width:100%}
 html.dk-m body .content .dk-ink{color:#03111b!important;-webkit-text-fill-color:#03111b!important}
 /* Short or empty lists: just the cards, no search/filter/pager clutter. */
 html.dk-m body .edg.dk-grid-empty :is(.edg-toolbar,.edg-footer),html.dk-m body .edg.dk-grid-short :is(.edg-toolbar,.edg-footer){display:none!important}
 html.dk-m body .edg.dk-grid-empty tbody td[colspan]{padding:18px 12px!important;text-align:center!important;color:var(--text-secondary,#b5bfca)!important;font-weight:600}
 html.dk-m body .edg.dk-grid-empty tbody tr{border-style:dashed!important;background:transparent!important}
 /* Cards without an icon use the full width. */
 html.dk-m body .hub-grid>.hub-item:not(:has(>i,>svg)){grid-template-columns:minmax(0,1fr)!important;min-height:0!important}
 html.dk-m body .hub-grid>.hub-item:not(:has(>i,>svg))>:is(h3,p){grid-column:1!important}
 html.dk-m body .hub-grid>.hub-item{min-height:0!important;padding:16px!important}
 html.dk-m body .hub-head{padding:18px!important}
 /* Tab strips and filter chips: one swipeable row like an app. */
 html.dk-m body .content :is(.income-nav,.history-filters){display:flex!important;flex-wrap:nowrap!important;gap:8px!important;overflow-x:auto!important;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin-left:-12px!important;margin-right:-12px!important;padding:2px 12px 6px!important;width:auto!important;max-width:none!important;scroll-snap-type:x proximity}
 html.dk-m body .content :is(.income-nav,.history-filters)::-webkit-scrollbar{display:none}
 html.dk-m body .content :is(.income-nav,.history-filters)>*{flex:0 0 auto!important;width:auto!important;white-space:nowrap!important;scroll-snap-align:start;min-height:40px!important;margin:0!important}
 html.dk-m body .content .income-nav a{padding:0 16px!important;display:inline-flex!important;align-items:center!important;border-radius:999px!important}
 /* Trading chart: broker account cards swipe with snap. */
 html.dk-m body .content :is(.account-strip,.accounts-strip,.mt5-strip,[class*="account-carousel"]){scroll-snap-type:x mandatory}
 html.dk-m body .content :is(.account-strip,.accounts-strip,.mt5-strip,[class*="account-carousel"])>*{scroll-snap-align:start}
 html.dk-m body .edg table.enterprise-mobile tbody td.dk-td-wide{grid-column:1/-1!important}
 /* Income stat tiles: two per row. */
 html.dk-m body .content .gdk-tiles{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 html.dk-m body .content .gdk-tiles>*{padding:14px!important;min-height:0!important;margin:0!important}
 html.dk-m body .content .gdk-tiles>*>:first-child{font-size:12.5px!important;line-height:1.3!important;margin:0 0 6px!important}
 html.dk-m body .content .gdk-tiles>:only-child,html.dk-m body .content .gdk-tiles>:last-child:nth-child(odd){grid-column:1/-1!important}
 /* Drawer: "Install app" entry */
 html.dk-m body .side .dk-install-link{display:flex;align-items:center;gap:11px;min-height:44px;margin:8px 0 4px;padding:0 14px;border-radius:12px;background:rgba(25,168,182,.12);border:1px solid rgba(25,168,182,.3);color:#e0f7fa!important;text-decoration:none;font-weight:700;font-size:14px}
}
@media (max-width:768px){
 /* ---------- one border level only (owner 1 Nov: no double borders/lines on small phones) ---------- */
 /* Header: a flat app bar — no boxed card, no rounded frame, plain icon buttons, one hairline. */
 html.dk-m body .top{border:0!important;border-radius:0!important;box-shadow:none!important;border-bottom:1px solid color-mix(in srgb,var(--border,rgba(230,237,244,.1)) 70%,transparent)!important;background:var(--page-bg,#0b111b)!important;backdrop-filter:none!important}
 html.dk-m body .top :is(.icon-btn,.menu-toggle){border:0!important;background:transparent!important;box-shadow:none!important;width:40px!important;height:40px!important}
 html.dk-m body .top :is(.icon-btn,.menu-toggle) svg{width:22px!important;height:22px!important}
 html.dk-m body .top .avatar{width:36px!important;height:36px!important;min-width:36px!important;border:0!important;box-shadow:none!important}
 /* Page heading card at the top of hub pages: plain title, no frame. */
 html.dk-m body .content>.dk-pagehead{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;padding:2px 2px 4px!important;margin-bottom:4px!important}
 html.dk-m body .content>.dk-pagehead:before{display:none!important}
 html.dk-m body .content>.dk-pagehead>i,html.dk-m body .content>.dk-pagehead>svg{display:none!important}
 html.dk-m body .content>.dk-pagehead h1{font-size:22px!important;margin:0 0 4px!important}
 html.dk-m body .content>.dk-pagehead p{margin:0!important;font-size:13.5px!important}
 /* Boxes inside a card: soft tint instead of a second border. */
 html.dk-m body .content .dk-nest{border-color:transparent!important}
 html.dk-m body .content .dk-tint{background:rgba(255,255,255,.04)!important}
 html[data-theme="light"].dk-m body .content .dk-tint{background:rgba(15,23,42,.04)!important}
 /* Tables: no frame around the list; each row card keeps its single border. */
 html.dk-m body .content :is(.table-wrap,.table-scroll,.trade-table-wrap,.scroll,.edg,.edg-scroll){border:0!important;background:transparent!important;background-image:none!important;box-shadow:none!important;padding:0!important;border-radius:0!important;margin-left:0!important;margin-right:0!important}
 html.dk-m body .content .edg :is(.edg-toolbar,.edg-footer){background:transparent!important;border:0!important;padding-left:0!important;padding-right:0!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody{padding:0!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody td{border-bottom:0!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody tr{box-shadow:none!important}
 /* Card spacing: tighter so more fits on a small screen. */
 html.dk-m body .content :is(.card,.panel,.hub-item,.stat-card,.ent-panel,.setting-card,.table-card){box-shadow:none!important}
 html.dk-m body .content :is(.card,.panel,.hub-item,.ent-panel,.setting-card):before{display:none!important}
}
@media (max-width:768px){
 /* ---------- app density (owner 1 Nov: small side margins, balanced font / card / text sizes) ---------- */
 html.dk-m body{font-size:14.5px!important;-webkit-text-size-adjust:100%}
 html.dk-m body .content,html.dk-m body.role-user .content{padding-left:8px!important;padding-right:8px!important;padding-top:calc(66px + env(safe-area-inset-top))!important}
 html.dk-m body .content :is(.income-nav,.history-filters){margin-left:-8px!important;margin-right:-8px!important;padding-left:8px!important;padding-right:8px!important}
 html.dk-m body .content :is(.grid,.hub-grid,.dashboard-grid,.stat-grid,.wallet-grid,.plan-grid,.resource-grid,.cards,.summary){gap:10px!important}
 /* Cards: one size everywhere. */
 html.dk-m body .content :is(.card,.panel,.hub-item,.hub-head,.stat-card,.ent-panel,.ent-hero,.e-card,.setting-card,.table-card,.wallet-panel,.wallet-head,.plan-card,.income-card,.level-card,.my-plans,.usdt-checkout,.activation-card,.saved-account-dashboard,.profile-hero,.simple-card,.connections){padding:14px!important;border-radius:16px!important}
 html.dk-m body .content .dk-card{padding:14px!important;border-radius:16px!important;box-shadow:none!important}
 html.dk-m body .content .dk-nest{padding:12px!important;border-radius:12px!important}
 html.dk-m body .content .dk-flat,html.dk-m body .content>.dk-pagehead{padding:0 2px!important}
 html.dk-m body .content .hub-grid>.hub-item{padding:14px!important;column-gap:12px!important;grid-template-columns:28px minmax(0,1fr)!important}
 html.dk-m body .content .hub-grid>.hub-item:not(:has(>i,>svg)){grid-template-columns:minmax(0,1fr)!important}
 html.dk-m body .content .hub-grid>.hub-item>:is(i,svg){width:24px!important;height:24px!important}
 /* Text sizes. */
 html.dk-m body .content h1{font-size:21px!important;line-height:1.25!important;letter-spacing:-.01em!important;margin:0 0 6px!important}
 html.dk-m body .content h2{font-size:18px!important;line-height:1.3!important;margin:0 0 8px!important}
 html.dk-m body .content h3{font-size:15.5px!important;line-height:1.35!important;margin:0 0 4px!important}
 html.dk-m body .content :is(p,li,dd,.muted){font-size:14px!important;line-height:1.5!important}
 html.dk-m body .content small{font-size:12.5px!important}
 html.dk-m body .content label{font-size:13px!important;line-height:1.4!important}
 html.dk-m body .content :is(.kicker,.eyebrow,.sa-kicker,.card-label){font-size:11px!important;letter-spacing:.08em!important}
 html.dk-m body .content :is(.big,.primary-value,.stat-value){font-size:22px!important}
 /* Form controls and buttons: comfortable thumb size, not oversized. */
 html.dk-m body .content :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select){min-height:46px!important;height:46px!important;padding-top:0!important;padding-bottom:0!important;padding-left:12px!important;padding-right:12px!important;font-size:16px!important;border-radius:12px!important}
 html.dk-m body .content input[type=file]{min-height:46px!important;font-size:13.5px!important;padding:8px!important;border-radius:12px!important}
 html.dk-m body .content textarea{min-height:96px!important;padding:10px 12px!important;font-size:16px!important;border-radius:12px!important}
 html.dk-m body .content :is(button,.btn,a.btn,.primary,input[type=submit]):not(.edg *){min-height:44px!important;border-radius:12px!important;font-size:14px!important}
 /* Data-grid row cards. */
 html.dk-m body .content .edg table.enterprise-mobile tbody tr{padding:6px 10px!important;border-radius:14px!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody td{padding:7px 4px!important;font-size:14px!important;min-height:0!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody td:before{font-size:10.5px!important}
 /* Header text. */
 html.dk-m body .page-title{font-size:16.5px!important;font-weight:700!important}
}
@media (max-width:768px){
 /* ---------- readable app sizes (owner 2 Nov: "barik barik" — text and controls too small) ---------- */
 html.dk-m body{font-size:15.5px!important}
 html.dk-m body .content :is(p,li,dd,.muted,td){font-size:15px!important;line-height:1.55!important}
 html.dk-m body .content small{font-size:13px!important}
 html.dk-m body .content label{font-size:14px!important}
 html.dk-m body .content h1{font-size:23px!important}
 html.dk-m body .content h2{font-size:19.5px!important}
 html.dk-m body .content h3{font-size:17px!important}
 html.dk-m body .content :is(.kicker,.eyebrow,.sa-kicker,.card-label){font-size:12px!important}
 html.dk-m body .content :is(.big,.primary-value,.stat-value){font-size:24px!important}
 /* 16px inputs: phones never zoom in when a field is tapped. */
 html.dk-m body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){font-size:16px!important}
 html.dk-m body .content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea),html.dk-m body .edg :is(input,select){font-size:16px!important}
 html.dk-m body .content :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select){min-height:48px!important;height:48px!important}
 html.dk-m body .content :is(button,.btn,a.btn,.primary,input[type=submit]):not(.edg *){min-height:46px!important;font-size:15px!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody td{font-size:15px!important}
 html.dk-m body .content .edg table.enterprise-mobile tbody td:before{font-size:11.5px!important}
 html.dk-m body .content .edg td :is(.btn,button,select,a.btn){min-height:40px!important;height:40px!important;font-size:13.5px!important}
 html.dk-m body .page-title{font-size:17.5px!important}
 html.dk-m body .mobile-brand{font-size:11px!important}
 html.dk-m body .bottom-nav :is(a,button){font-size:11px!important;font-weight:700!important}
 html.dk-m body .bottom-nav :is(a,button) svg{width:23px!important;height:23px!important}
 html.dk-m body .side .nav a,html.dk-m body .side .nav-fold>summary{font-size:15.5px!important;min-height:48px!important}
 html.dk-m body .side .nav-label{font-size:12px!important}
 /* Every other table (admin lists included) becomes cards: label left, value right, no sideways desktop table. */
 html.dk-m body .content table.enterprise-mobile:not(.edg table){display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;border:0!important;background:transparent!important;table-layout:auto!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table)>:is(thead,tfoot){display:none!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table)>tbody{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) tr{display:block!important;width:100%!important;min-width:0!important;height:auto!important;margin:0!important;padding:6px 12px!important;border:1px solid var(--border,rgba(230,237,244,.12))!important;border-radius:14px!important;background:var(--surface,#131e2c)!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) tr:not(:has(>td)){display:none!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td{position:static!important;display:grid!important;grid-template-columns:minmax(92px,38%) minmax(0,1fr)!important;grid-auto-flow:row!important;align-items:start!important;gap:2px 10px!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;padding:9px 0!important;border:0!important;border-bottom:1px solid var(--border,rgba(230,237,244,.08))!important;border-radius:0!important;background:transparent!important;text-align:left!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;font-size:15px!important;box-shadow:none!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td:last-child{border-bottom:0!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td:empty{display:none!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td:before{content:attr(data-label)!important;display:block!important;grid-column:1!important;grid-row:1 / span 3!important;align-self:start!important;padding-top:2px!important;font-size:12.5px!important;font-weight:700!important;letter-spacing:0!important;text-transform:none!important;color:var(--text-secondary,#b5bfca)!important;line-height:1.3!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td[colspan]{display:block!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td[colspan]:before{display:none!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td>*{grid-column:2!important;min-width:0!important}
 html.dk-m body .content table.enterprise-mobile:not(.edg table) td :is(.btn,button,select,a.btn){min-height:40px!important;font-size:14px!important}
 /* Wrappers that used to scroll a wide table sideways are plain boxes now. */
 html.dk-m body .content :is(.table-wrap,.table-scroll,.scroll,.trade-table-wrap,[class*="-scroll"]):has(table.enterprise-mobile:not(.edg table)){overflow:visible!important;max-height:none!important;padding:0!important;border:0!important;background:transparent!important}
 /* Nothing may be wider than the phone: that is what made the page zoom out and look tiny. */
 html.dk-m,html.dk-m body{overflow-x:clip!important;max-width:100vw!important}
 html.dk-m body .content :is(img,video,canvas,iframe,svg,pre,table){max-width:100%!important}
}
@media (max-width:380px){
 html.dk-m body .content,html.dk-m body.role-user .content{padding-left:8px!important;padding-right:8px!important}
 html.dk-m body .page-title{max-width:calc(100vw - 196px)!important;font-size:15px!important}
}

/* Dashboard quick actions exist in the markup on every width; only the v2 phone shell shows them. */
.dk-quick{display:none}

/* ---------- v2 phone shell (owner 2 Nov spec; html.dk-m2, preview via ?mobile=v2) ---------- */
@media (max-width:768px){
 html.dk-m2{-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation;overscroll-behavior-y:none}
 html.dk-m2 body{font-size:16px!important;overscroll-behavior-y:none}
 /* Top bar: page title, bell, avatar. No hamburger, no brand line, no theme button (theme lives in Profile). */
 html.dk-m2 body .top :is(.menu-toggle,#themeToggle,.mobile-brand){display:none!important}
 html.dk-m2 body .top .top-left{padding-left:6px!important}
 html.dk-m2 body .top .page-title{font-size:19px!important;max-width:calc(100vw - 130px)!important}
 /* Bottom nav: five tabs, icon + short label, active pill. */
 html.dk-m2 body .bottom-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;left:0!important;right:0!important;bottom:0!important;border-radius:18px 18px 0 0!important;height:calc(64px + env(safe-area-inset-bottom))!important;padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;border:0!important;border-top:1px solid var(--border,rgba(230,237,244,.1))!important;background:var(--surface,#131e2c)!important;box-shadow:0 -6px 24px rgba(0,0,0,.25)!important}
 html.dk-m2 body .bottom-nav :is(a,button){display:grid!important;justify-items:center!important;align-content:center!important;gap:3px!important;border:0!important;background:transparent!important;color:var(--text-secondary,#b5bfca)!important;font-size:11.5px!important;font-weight:700!important;border-radius:14px!important;padding:4px 0!important;min-height:0!important;box-shadow:none!important}
 html.dk-m2 body .bottom-nav :is(a,button) svg{width:24px!important;height:24px!important}
 html.dk-m2 body .bottom-nav :is(a.active,button.active){color:var(--accent,#19a8b6)!important;background:rgba(25,168,182,.14)!important}
 html.dk-m2 body .content,html.dk-m2 body.role-user .content{padding-bottom:calc(84px + env(safe-area-inset-bottom))!important}
 /* Profile tab: the full menu as a sheet that slides up above the bottom nav. */
 html.dk-m2 body .side{inset:calc(60px + env(safe-area-inset-top)) 0 calc(64px + env(safe-area-inset-bottom)) 0!important;top:calc(60px + env(safe-area-inset-top))!important;bottom:calc(64px + env(safe-area-inset-bottom))!important;width:100%!important;max-width:none!important;border-radius:0!important;border:0!important;transform:translateY(calc(100% + 120px))!important;visibility:hidden!important;z-index:1090!important;transition:transform .26s cubic-bezier(.2,.8,.2,1),visibility 0s linear .26s!important;padding:12px 14px 24px!important;box-shadow:none!important;background:var(--page-bg,#0b111b)!important}
 html.dk-m2 body .side.open{transform:none!important;visibility:visible!important;transition:transform .26s cubic-bezier(.2,.8,.2,1),visibility 0s!important}
 html.dk-m2 body .side .brand-row{display:none!important}
 html.dk-m2 body .overlay{display:none!important}
 html.dk-m2 body .side .nav-group{margin:10px 0!important}
 html.dk-m2 body .side .nav-label{padding-left:4px!important}
 html.dk-m2 body .side .nav a{background:var(--surface,#131e2c)!important;border:0!important;border-radius:14px!important;margin:6px 0!important;padding:0 16px!important;min-height:52px!important;font-size:16px!important;box-shadow:none!important}
 html.dk-m2 body .side .nav a:before{display:none!important}
 html.dk-m2 body .side .nav a.active{background:rgba(25,168,182,.16)!important}
 html.dk-m2 body .side .logout{min-height:52px!important;font-size:16px!important;border-radius:14px!important}
 html.dk-m2 body .dk-sheet-head{display:flex;align-items:center;gap:14px;padding:14px 16px;margin:0 0 6px;border-radius:16px;background:var(--surface,#131e2c)}
 html.dk-m2 body .dk-sheet-head .dk-sheet-av{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:20px;color:#fff;background:linear-gradient(135deg,#0787ff,#19a8b6);flex:0 0 48px;overflow:hidden}
 html.dk-m2 body .dk-sheet-head .dk-sheet-av img{width:100%;height:100%;object-fit:cover}
 html.dk-m2 body .dk-sheet-head b{display:block;font-size:17px;color:var(--text-primary,#f5f3ee)}
 html.dk-m2 body .dk-sheet-head small{display:block;font-size:13.5px;color:var(--text-secondary,#b5bfca);overflow-wrap:anywhere}
 html.dk-m2 body .side .dk-sheet-row{display:flex!important;align-items:center;gap:11px;width:100%;min-height:52px!important;padding:0 16px!important;margin:6px 0!important;border:0!important;border-radius:14px!important;background:var(--surface,#131e2c)!important;color:var(--text-primary,#f5f3ee)!important;font-size:16px!important;font-weight:650!important;text-align:left;box-shadow:none!important}
 html.dk-m2 body .side .dk-sheet-row svg{width:19px;height:19px}
 /* Dashboard order: balance, quick actions, today P&L / win rate, chart, setup, activation, then the rest. */
 html.dk-m2 body .content>.dash-head{display:none!important}
 html.dk-m2 body .dashboard-grid{display:flex!important;flex-direction:column!important;gap:12px!important}
 html.dk-m2 body .dashboard-grid>.wallet{order:1}
 html.dk-m2 body .dashboard-grid>.dk-quick{order:2}
 html.dk-m2 body .dashboard-grid>.performance-stats{order:3}
 html.dk-m2 body .dashboard-grid>.performance-panel{order:4}
 html.dk-m2 body .dashboard-grid>.setup{order:5}
 html.dk-m2 body .dashboard-grid>.automation{order:6}
 html.dk-m2 body .dashboard-grid>.strategy{order:7}
 html.dk-m2 body .dashboard-grid>.trading-metrics{order:8}
 html.dk-m2 body .dashboard-grid>.trades-panel{order:9}
 html.dk-m2 body .dashboard-grid>.subscription{order:10}
 html.dk-m2 body .dashboard-grid>.referral{order:11}
 html.dk-m2 body .dashboard-grid>.notifications-panel{order:12}
 html.dk-m2 body .dashboard-grid>.resource-grid{order:13}
 html.dk-m2 body .dashboard-grid>*{margin:0!important;width:100%!important}
 html.dk-m2 body .dashboard-grid>.wallet h2{font-size:28px!important;letter-spacing:-.01em}
 html.dk-m2 body .dk-quick{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 html.dk-m2 body .dk-quick a{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 14px;border-radius:16px;background:var(--surface,#131e2c);border:1px solid var(--border,rgba(230,237,244,.1));color:var(--text-primary,#f5f3ee);text-decoration:none;font-size:15.5px;font-weight:700}
 html.dk-m2 body .dk-quick a svg{width:26px;height:26px;padding:8px;box-sizing:content-box;border-radius:12px;background:rgba(25,168,182,.14);color:var(--accent,#19a8b6);flex:0 0 26px}
 html.dk-m2 body .dk-quick a:active{transform:scale(.97)}
 html.dk-m2 body .dashboard-grid>.performance-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 html.dk-m2 body .dashboard-grid>.performance-stats .mini-stat{padding:14px!important;border-radius:16px!important;min-height:0!important}
 html.dk-m2 body .dashboard-grid>.performance-stats .mini-stat strong{font-size:20px!important}
 html.dk-m2 body .dashboard-grid>.performance-stats .mini-stat span{font-size:13px!important}
 html.dk-m2 body .dashboard-grid>.performance-stats .mini-stat small{font-size:12px!important}
 html.dk-m2 body .resource-grid{grid-template-columns:minmax(0,1fr)!important}
 /* Tap feedback everywhere. */
 html.dk-m2 body :is(a,button,.hub-item,.dk-quick a,.bottom-nav a){-webkit-tap-highlight-color:rgba(25,168,182,.18)}
 html.dk-m2 body .content :is(.hub-item,.card,.resource-card):active{transform:scale(.985);transition:transform .08s}
}

/* ---------- v2 step 3-4: tile menus, table sheet + Prev/Next, sticky form button (owner 2 Nov) ---------- */
@media (max-width:768px){
 /* Hub tile menus (Trading & MT5, Wallet & Payments, Account, Team): 2 columns, big icon, short title, one line. */
 html.dk-m2 body .content .hub-grid:has(>.hub-item>:is(i,svg)){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 html.dk-m2 body .content .hub-grid>.hub-item:has(>:is(i,svg)){display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;min-height:136px!important;padding:14px!important;text-decoration:none!important}
 html.dk-m2 body .content .hub-grid>.hub-item>:is(i,svg){width:28px!important;height:28px!important;padding:9px!important;box-sizing:content-box!important;border-radius:14px!important;background:rgba(25,168,182,.14)!important;color:var(--accent,#19a8b6)!important;grid-row:auto!important;margin:0 0 2px!important}
 html.dk-m2 body .content .hub-grid>.hub-item:has(>:is(i,svg))>h3{font-size:15.5px!important;line-height:1.3!important;margin:0!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
 html.dk-m2 body .content .hub-grid>.hub-item:has(>:is(i,svg))>p{font-size:13px!important;line-height:1.4!important;margin:0!important;color:var(--text-secondary,#b5bfca)!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
 /* Data grids: search/filter tools live in a bottom sheet behind one button. */
 html.dk-m2 body .content .edg:has(.dk-filter-btn) .edg-toolbar{display:none!important}
 html.dk-m2 body .content .dk-filter-btn{display:inline-flex!important;align-items:center;gap:8px;min-height:42px!important;height:42px!important;width:auto!important;margin:0 0 10px!important;padding:0 14px!important;border-radius:999px!important;border:1px solid var(--border,rgba(230,237,244,.14))!important;background:var(--surface,#131e2c)!important;color:var(--text-primary,#f5f3ee)!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important}
 html.dk-m2 body .content .dk-filter-btn svg{width:18px;height:18px}
 html.dk-m2 body .content .edg.dk-tb-open .edg-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;z-index:1300!important;max-height:80vh;overflow:auto;padding:16px 16px calc(20px + env(safe-area-inset-bottom))!important;border-radius:20px 20px 0 0!important;background:var(--surface,#131e2c)!important;border:0!important;border-top:1px solid var(--border,rgba(230,237,244,.14))!important;box-shadow:0 -12px 40px rgba(0,0,0,.45)!important}
 html.dk-m2 body .content .edg.dk-tb-open .edg-toolbar>*{grid-column:1!important;width:100%!important}
 html.dk-m2 body .content .edg .edg-toolbar [data-act="filters"]{display:none!important}
 html.dk-m2 body .content .edg .edg-toolbar .edg-tool-group{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
 html.dk-m2 body .content .edg .edg-toolbar :is(button,summary){min-height:46px!important;height:46px!important;font-size:15px!important;border-radius:12px!important}
 html.dk-m2 body .content .edg .edg-toolbar .edg-search input{min-height:48px!important;height:48px!important}
 html.dk-m2 body .dk-sheet-title{display:flex;align-items:center;justify-content:space-between;font-size:17px;font-weight:800;color:var(--text-primary,#f5f3ee)}
 html.dk-m2 body .dk-sheet-title button{min-height:38px!important;height:38px!important;width:auto!important;padding:0 14px!important;border-radius:999px!important;font-size:14px!important;background:var(--accent,#19a8b6)!important;color:#fff!important;border:0!important}
 html.dk-m2 body .dk-sheet-backdrop{position:fixed;inset:0;z-index:1290;background:rgba(2,6,12,.55)}
 html.dk-m2 body .content :is(.card,.panel,.dk-card,section,div):has(>.edg.dk-tb-open),html.dk-m2 body .content *:has(.edg.dk-tb-open){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;filter:none!important;animation:none!important}
 /* Pagination: just Prev / Next with the row count. */
 html.dk-m2 body .content .edg .edg-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important}
 html.dk-m2 body .content .edg .edg-footer label.edg-meta{display:none!important}
 html.dk-m2 body .content .edg .edg-pages{display:flex!important;gap:8px!important}
 html.dk-m2 body .content .edg .edg-pages .edg-page{display:none!important}
 html.dk-m2 body .content .edg .edg-pages .edg-page:nth-child(2),html.dk-m2 body .content .edg .edg-pages .edg-page:nth-last-child(2){display:inline-flex!important;align-items:center;justify-content:center;font-size:0!important;min-width:88px!important;height:42px!important;min-height:42px!important;padding:0 12px!important;border-radius:12px!important}
 html.dk-m2 body .content .edg .edg-pages .edg-page:nth-child(2):before{content:"‹ Prev";font-size:14px}
 html.dk-m2 body .content .edg .edg-pages .edg-page:nth-last-child(2):before{content:"Next ›";font-size:14px}
 html.dk-m2 body .content .edg .edg-pages .edg-page:disabled{opacity:.4}
 /* Laravel paginators: simple Previous / Next only. */
 html.dk-m2 body .content nav[role="navigation"]>div:first-child{display:flex!important;justify-content:space-between!important;gap:10px!important}
 html.dk-m2 body .content nav[role="navigation"]>div:last-child{display:none!important}
 html.dk-m2 body .content nav[role="navigation"]>div:first-child :is(a,span){min-height:44px!important;padding:0 18px!important;font-size:14px!important;border-radius:12px!important}
 /* Long forms: the main button stays in reach at the bottom while the form is on screen. */
 html.dk-m2 body .content .dk-sticky-submit{position:sticky!important;bottom:calc(76px + env(safe-area-inset-bottom))!important;z-index:20!important;width:100%!important;min-height:50px!important;box-shadow:0 -8px 24px rgba(0,0,0,.35)!important}
 html.dk-m2 body .content :is(.card,.panel,.dk-card,.usdt-checkout,.activation-card,form,section,div):has(.dk-sticky-submit){overflow:visible!important}
 /* No pull-to-refresh bounce. */
 html.dk-m2,html.dk-m2 body{overscroll-behavior-y:none!important}
}