/* NRPSUCHIN Customer Mobile UI V1
   Mobile presentation only. Desktop remains untouched. */
.nrp-mobile-header,.nrp-mobile-nav,.nrp-mobile-drawer,.nrp-mobile-backdrop{display:none}

@media (max-width:850px){
  :root{--nrp-mobile-nav-h:68px;--nrp-mobile-head-h:58px}
  body.app-page{padding:0 0 calc(var(--nrp-mobile-nav-h) + env(safe-area-inset-bottom,0px));background:#08111b}
  body.app-page .sidebar{display:none!important}
  body.app-page .app-shell{display:block;min-height:100vh}
  body.app-page .main{padding:calc(var(--nrp-mobile-head-h) + 14px) 12px 24px!important;max-width:none;width:100%;min-width:0}

  .nrp-mobile-header{display:flex;position:fixed;z-index:80;left:0;right:0;top:0;height:calc(var(--nrp-mobile-head-h) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 12px 0;align-items:center;justify-content:space-between;gap:10px;background:rgba(8,17,27,.96);border-bottom:1px solid #1b2b3d;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .nrp-mobile-brand{display:flex;align-items:center;gap:9px;min-width:0;color:#eef7ff;text-decoration:none}
  .nrp-mobile-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:linear-gradient(145deg,#183a57,#0d2133);border:1px solid #28506e;font-weight:900;font-size:15px;box-shadow:0 8px 24px rgba(0,0,0,.2)}
  .nrp-mobile-brand-copy{display:grid;min-width:0;line-height:1.05}
  .nrp-mobile-brand-copy strong{font-size:12px;letter-spacing:.7px}
  .nrp-mobile-brand-copy span{margin-top:4px;color:#7890a8;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:48vw}
  .nrp-mobile-head-actions{display:flex;gap:7px;align-items:center;flex:0 0 auto}
  .nrp-mobile-head-actions .nrp-language-switcher{position:static!important;right:auto!important;top:auto!important;z-index:auto;margin:0;padding:5px 7px;gap:5px;flex:0 0 auto;background:#0d1925;border-color:#21384d;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .nrp-mobile-head-actions .nrp-language-switcher button{padding:3px 2px;font-size:10px;line-height:1}
  .nrp-mobile-head-actions .nrp-language-switcher span{font-size:9px;line-height:1}
  .nrp-mobile-icon-btn{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;border:1px solid #21384d;background:#0d1925;color:#dceaf5;text-decoration:none;padding:0;cursor:pointer}
  .nrp-mobile-icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

  .nrp-mobile-nav{display:grid;position:fixed;z-index:85;left:0;right:0;bottom:0;grid-template-columns:repeat(5,minmax(0,1fr));min-height:calc(var(--nrp-mobile-nav-h) + env(safe-area-inset-bottom,0px));padding:7px 6px env(safe-area-inset-bottom,0px);background:rgba(9,17,27,.97);border-top:1px solid #1c2e40;box-shadow:0 -12px 30px rgba(0,0,0,.28);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .nrp-mobile-nav a,.nrp-mobile-nav button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;border:0;background:transparent;color:#7f94a8;text-decoration:none;font:inherit;padding:3px 2px;cursor:pointer}
  .nrp-mobile-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .nrp-mobile-nav span{max-width:100%;font-size:9px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nrp-mobile-nav .active{color:#eaf5ff}
  .nrp-mobile-nav .active:before{content:"";position:absolute;top:-7px;width:28px;height:2px;border-radius:99px;background:#63b8ff;box-shadow:0 0 12px rgba(99,184,255,.7)}

  .nrp-mobile-backdrop{display:block;position:fixed;z-index:88;inset:0;background:rgba(0,0,0,.62);opacity:0;pointer-events:none;transition:opacity .18s ease}
  .nrp-mobile-drawer{display:block;position:fixed;z-index:89;left:10px;right:10px;bottom:calc(var(--nrp-mobile-nav-h) + env(safe-area-inset-bottom,0px) + 8px);max-height:min(68vh,560px);overflow:auto;padding:10px;background:#0d1824;border:1px solid #23384c;border-radius:18px;box-shadow:0 24px 60px rgba(0,0,0,.45);transform:translateY(18px);opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
  .nrp-mobile-drawer.open{transform:translateY(0);opacity:1;pointer-events:auto}
  .nrp-mobile-backdrop.open{opacity:1;pointer-events:auto}
  .nrp-mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:7px 7px 10px}
  .nrp-mobile-drawer-head strong{font-size:13px}
  .nrp-mobile-drawer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .nrp-mobile-drawer-grid a{display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 11px;border:1px solid #1c3042;border-radius:12px;background:#0a1520;color:#d9e6f1;text-decoration:none;font-size:11px;font-weight:700;min-width:0}
  .nrp-mobile-drawer-grid a.active{border-color:#2e648e;background:#102337;color:#fff}
  .nrp-mobile-drawer-grid svg{width:18px;height:18px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .nrp-mobile-drawer-grid span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  body.nrp-mobile-menu-open{overflow:hidden}

  /* Mobile page rhythm: phone-first instead of scaled desktop. */
  body.app-page .topbar,body.app-page .page-head,body.app-page .performance-hero,body.app-page .nrp-terminal-head{margin:0 0 12px!important;padding:0 0 12px!important;border-bottom:1px solid #15283a;display:flex;flex-direction:column;align-items:stretch;gap:10px}
  body.app-page .topbar h1,body.app-page .page-head h1,body.app-page .performance-hero h1,body.app-page .nrp-terminal-head h1{font-size:22px!important;line-height:1.15;margin:3px 0 4px}
  body.app-page .topbar .muted,body.app-page .page-head .muted,body.app-page .performance-hero .muted,body.app-page .nrp-terminal-head p{font-size:11px;line-height:1.45}
  body.app-page .top-actions,body.app-page .nrp-head-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}
  body.app-page .top-actions>*:only-child,body.app-page .nrp-head-actions>*:only-child{grid-column:1/-1}
  body.app-page .top-actions .session-user{grid-column:1/-1}
  body.app-page .top-actions .btn,body.app-page .nrp-head-actions .btn{width:100%;justify-content:center}

  body.app-page .cards,body.app-page .nrp-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.app-page .stat-card,body.app-page .nrp-kpi{border-radius:14px;min-height:92px;padding:13px!important}
  body.app-page .stat-card strong,body.app-page .nrp-kpi strong{font-size:19px!important;line-height:1.15}
  body.app-page .two-col,body.app-page .alert-layout,body.app-page .source-grid{grid-template-columns:1fr!important;gap:10px!important}
  body.app-page .panel,body.app-page .identity-panel,body.app-page .nrp-filter-panel,body.app-page .nrp-account-card{border-radius:15px}
  body.app-page .identity-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.app-page .info-grid{grid-template-columns:1fr!important}
  body.app-page .info-grid>div{border-right:0!important;border-bottom:1px solid #202b3c}
  body.app-page .info-grid>div:last-child{border-bottom:0}

  body.app-page .filters,body.app-page .history-filters,body.app-page .chart-filterbar{display:grid!important;grid-template-columns:1fr!important;gap:8px;width:100%}
  body.app-page .filters select,body.app-page .filters input,body.app-page .history-filters select,body.app-page .history-filters input,body.app-page .chart-filterbar select{width:100%!important;min-width:0!important;min-height:44px}
  body.app-page .nrp-filter-grid{grid-template-columns:1fr!important}

  body.app-page .table-wrap,body.app-page .nrp-wide-table{margin-left:-2px;margin-right:-2px;border-radius:12px;box-shadow:inset -18px 0 20px -22px rgba(137,190,230,.65)}
  body.app-page .table-wrap:after,body.app-page .nrp-wide-table:after{content:"↔";position:sticky;right:6px;float:right;margin-top:-24px;margin-right:6px;color:#5d7890;font-size:11px;pointer-events:none}

  body.app-page .nrp-terminal{padding:calc(var(--nrp-mobile-head-h) + 14px) 10px 24px!important}
  body.app-page .nrp-account-grid{grid-template-columns:1fr!important;gap:9px}
  body.app-page .nrp-account-card{padding:13px!important}
  body.app-page .nrp-account-money{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.app-page .nrp-inspector-kpis,body.app-page .nrp-inspector-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.app-page .nrp-magic-grid{grid-template-columns:1fr!important}

  body.app-page .canvas-wrap{height:245px!important;border-radius:14px;padding:8px!important}
  body.app-page .small-canvas{height:215px!important}
  body.app-page .customer-content-slot{border-radius:15px}

  /* Notification cards become a true one-column phone feed. */
  body.app-page #notificationList.card-grid{grid-template-columns:1fr!important;gap:9px}

  /* Help has its own desktop shell; only add the mobile app navigation. */
  body.help-page{padding-bottom:calc(var(--nrp-mobile-nav-h) + env(safe-area-inset-bottom,0px))}
  body.help-page .nrp-mobile-header{display:flex}
  body.help-page .nrp-mobile-nav{display:grid}
}

@media (max-width:420px){
  .nrp-mobile-header{padding-left:9px;padding-right:9px;gap:6px}
  .nrp-mobile-brand{gap:7px}
  .nrp-mobile-brand-copy span{max-width:30vw}
  .nrp-mobile-head-actions{gap:5px}
  .nrp-mobile-head-actions .nrp-language-switcher{padding:4px 5px;gap:3px}
  .nrp-mobile-icon-btn{width:36px;height:36px}
  body.app-page .cards,body.app-page .nrp-kpi-grid{grid-template-columns:1fr 1fr!important}
  body.app-page .identity-panel{grid-template-columns:1fr!important}
  body.app-page .nrp-account-money{grid-template-columns:1fr!important}
  body.app-page .nrp-inspector-kpis,body.app-page .nrp-inspector-meta{grid-template-columns:1fr 1fr!important}
}

/* MOBILE FINAL SHELL — presentation-only, desktop untouched */
@media(max-width:850px){
  body.app-page .session-user{display:none!important}
  .nrp-mobile-header{grid-template-columns:auto minmax(0,1fr) auto;justify-content:initial}
  .nrp-mobile-brand{flex:0 0 auto}
  .nrp-mobile-brand-copy{display:none!important}
  .nrp-mobile-mark{width:34px;height:34px;border-radius:10px}
  .nrp-mobile-user{display:flex;align-items:center;gap:8px;min-width:0}
  .nrp-mobile-user-avatar{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:8px;background:#0d1925;border:1px solid #21384d;color:#8db6d5}
  .nrp-mobile-user-avatar svg{width:16px;height:16px;fill:currentColor;stroke:none}
  .nrp-mobile-user-copy{display:grid;min-width:0;line-height:1.15}
  .nrp-mobile-user-copy strong,.nrp-mobile-user-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nrp-mobile-user-copy strong{font-size:11px;color:#edf6ff}
  .nrp-mobile-user-copy small{font-size:9px;color:#748ca3;margin-top:2px}
  .nrp-mobile-head-actions{margin-left:auto}
  .nrp-mobile-drawer{bottom:calc(var(--nrp-mobile-nav-h) + env(safe-area-inset-bottom,0px) + 8px)}
  .nrp-mobile-drawer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nrp-mobile-drawer-account{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding:10px 7px 2px;border-top:1px solid #1c3042}
  .nrp-mobile-drawer-account>div{display:grid;min-width:0}
  .nrp-mobile-drawer-account strong,.nrp-mobile-drawer-account small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nrp-mobile-drawer-account strong{font-size:11px}.nrp-mobile-drawer-account small{font-size:9px;color:#71899f;margin-top:2px}
  body.app-page .nrp-head-actions,body.app-page .top-actions{max-width:100%}
  body.app-page .nrp-head-actions>*:not(.session-user),body.app-page .top-actions>*:not(.session-user){min-width:0}
}
@media(max-width:390px){
  .nrp-mobile-user-avatar{display:none}
  .nrp-mobile-user-copy strong{font-size:10px}.nrp-mobile-user-copy small{font-size:8px}
  .nrp-mobile-head-actions .nrp-language-switcher{padding:3px 4px;gap:2px}
  .nrp-mobile-head-actions .nrp-language-switcher button{font-size:9px}
}
