/* Vortex Manager v57 — auth-page touch/scroll fix + iOS app shell */
:root{
  --vortex-safe-top: env(safe-area-inset-top, 0px);
  --vortex-safe-right: env(safe-area-inset-right, 0px);
  --vortex-safe-bottom: env(safe-area-inset-bottom, 0px);
  --vortex-safe-left: env(safe-area-inset-left, 0px);
  --vortex-app-bg:#030711;
}
html,body,#root{width:100%;max-width:100%;min-width:0;margin:0;background:var(--vortex-app-bg)!important;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{overflow-x:hidden;}
#root{min-width:0;background:var(--vortex-app-bg)!important;}

/* Normal mobile Safari website — keep the public site scrollable. */
@media(max-width:700px){
  body.vortex-public-page{
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y pinch-zoom;
  }
}

/* iPhone/iPad Home Screen app.
   IMPORTANT: WebKit standalone has long-standing viewport-height quirks with dvh.
   Use 100vh for the outer shell so the document itself reaches the physical bottom. */
@media(max-width:700px) and (display-mode:standalone){
  html{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100vh!important;
    min-height:100vh!important;
    max-height:100vh!important;
    overflow:hidden!important;
    background:var(--vortex-app-bg)!important;
  }
  body{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100vh!important;
    min-height:100vh!important;
    max-height:100vh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    background:var(--vortex-app-bg)!important;
    user-select:none;
    -webkit-user-select:none;
  }
  #root{
    position:fixed!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
    max-height:100%!important;
    display:flex!important;
    overflow:hidden!important;
    background:var(--vortex-app-bg)!important;
  }
  #root>div{
    min-width:0!important;
    max-width:100%!important;
    min-height:100%!important;
    background:var(--vortex-app-bg)!important;
  }
  /* Remove all earlier fake safe-area paint layers. */
  body::after{content:none!important;display:none!important;}
  input,textarea,[contenteditable="true"]{user-select:text;-webkit-user-select:text;}
  a,button,[role="button"]{-webkit-touch-callout:none;}
}

/* Browser app pages (not landing/login) still use a full-height shell, but don't lock public pages. */
@media(max-width:700px){
  body.vortex-browser:not(.vortex-public-page),
  body.vortex-browser:not(.vortex-public-page) #root{
    min-height:100dvh!important;
    background:var(--vortex-app-bg)!important;
  }
}

/* React Navigation tab bar: anchor the real bar, not a fake strip beneath it. */
@media(max-width:700px){
  .vortex-bottom-nav{
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
    margin:0!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    border-radius:18px!important;
    box-sizing:border-box!important;
    z-index:1200!important;
  }
  body.vortex-standalone .vortex-bottom-nav{
    position:fixed!important;
    bottom:max(8px,var(--vortex-safe-bottom))!important;
  }
  body.vortex-browser .vortex-bottom-nav{
    bottom:max(6px,var(--vortex-safe-bottom))!important;
  }
  .vortex-bottom-nav-content{height:100%!important;min-height:0!important;}
  .vortex-bottom-nav [role="tab"]{min-height:46px!important;}
  [aria-label="Open quick menu"]{
    width:48px!important;height:48px!important;border-radius:16px!important;
    bottom:calc(72px + max(8px,var(--vortex-safe-bottom)))!important;
    z-index:1250!important;
  }
}

.vortex-pwa-badge{position:absolute;z-index:99;display:flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#ff3b30;color:#fff;font:700 10px/17px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 0 0 2px #030711,0 4px 12px rgba(255,59,48,.28);pointer-events:none;top:-4px;right:-7px;}
.vortex-nav-badge-host{position:relative!important;overflow:visible!important;}
.vortex-pwa-install{position:fixed;left:max(12px,var(--vortex-safe-left));right:max(12px,var(--vortex-safe-right));bottom:calc(12px + var(--vortex-safe-bottom));z-index:2147483000;background:linear-gradient(145deg,rgba(13,29,54,.98),rgba(5,12,25,.98));border:1px solid rgba(95,148,255,.38);border-radius:16px;box-shadow:0 18px 46px rgba(0,0,0,.5);padding:12px;color:#f5f8ff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);}
.vortex-pwa-install-head{display:flex;gap:10px;align-items:center}.vortex-pwa-install-icon{width:40px;height:40px;border-radius:11px;box-shadow:0 6px 18px rgba(31,107,255,.28)}.vortex-pwa-install-title{font-size:15px;font-weight:800}.vortex-pwa-install-copy{font-size:12px;line-height:1.35;color:#aabbd7;margin-top:1px}.vortex-pwa-install-actions{display:flex;gap:8px;margin-top:10px}.vortex-pwa-install button{border:0;border-radius:11px;padding:9px 12px;font-weight:800;font-size:12px;cursor:pointer}.vortex-pwa-install-primary{flex:1;background:linear-gradient(135deg,#2f7cff,#5ba0ff);color:#fff}.vortex-pwa-install-dismiss{background:#142139;color:#b8c8e6}.vortex-pwa-share{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid rgba(150,180,230,.35);border-radius:7px;color:#dbe8ff;font-size:14px;margin:0 2px;vertical-align:-2px}
.vortex-pwa-toast{position:fixed;z-index:2147482999;left:50%;transform:translateX(-50%);bottom:calc(72px + max(6px,var(--vortex-safe-bottom)));max-width:calc(100vw - 28px);padding:10px 14px;border-radius:999px;background:rgba(10,22,42,.96);border:1px solid rgba(92,143,244,.34);color:#eef5ff;font:700 12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 14px 34px rgba(0,0,0,.42);backdrop-filter:blur(18px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vortex-pwa-update{cursor:pointer;background:linear-gradient(135deg,rgba(28,83,188,.98),rgba(15,51,115,.98));}
.vortex-install-now{appearance:none;-webkit-appearance:none;font-family:inherit;cursor:pointer;}
.vortex-pwa-install.vortex-pwa-install-attention{animation:vortexInstallPulse .42s ease-out;}
@keyframes vortexInstallPulse{0%{transform:scale(.97);opacity:.7}100%{transform:scale(1);opacity:1}}
@media(max-width:700px){
  body.vortex-public-page .vortex-pwa-install{bottom:calc(10px + env(safe-area-inset-bottom,0px));left:10px;right:10px;}
  body.vortex-public-page .actions .vortex-install-now{border:1px solid rgba(102,214,255,.32)!important;background:linear-gradient(135deg,rgba(71,124,255,.16),rgba(102,214,255,.10))!important;color:#eef7ff!important;}
}
.vortex-pwa-ios-guide{margin-top:10px;padding:10px 11px;border-radius:12px;background:rgba(7,17,34,.78);border:1px solid rgba(105,158,255,.22);color:#d9e7ff;font-size:12px;line-height:1.55;}
.vortex-pwa-ios-guide[hidden]{display:none!important}.vortex-pwa-ios-guide div+div{margin-top:5px}.vortex-pwa-install-primary:disabled{opacity:.78;cursor:default;}
@media(max-width:700px){.vortex-pwa-install-actions{display:grid;grid-template-columns:minmax(0,1fr) auto}.vortex-pwa-install-primary{min-height:42px;font-size:13px}.vortex-pwa-install-dismiss{min-height:42px}}
\n\n/* v56: Login/register are document pages, not fixed dashboard shells.\n   iOS standalone must be allowed to pan/resize for the software keyboard. */\n@media(max-width:700px){\n  html.vortex-auth-document,\n  html.vortex-auth-document body{\n    position:relative!important;\n    inset:auto!important;\n    width:100%!important;\n    height:auto!important;\n    min-height:100vh!important;\n    max-height:none!important;\n    overflow-x:hidden!important;\n    overflow-y:auto!important;\n    -webkit-overflow-scrolling:touch!important;\n    overscroll-behavior-y:auto!important;\n    touch-action:pan-y pinch-zoom!important;\n    background:var(--vortex-app-bg)!important;\n  }\n  html.vortex-auth-document body{\n    user-select:auto!important;\n    -webkit-user-select:auto!important;\n  }\n  html.vortex-auth-document #root{\n    position:relative!important;\n    inset:auto!important;\n    width:100%!important;\n    height:auto!important;\n    min-height:100vh!important;\n    max-height:none!important;\n    overflow:visible!important;\n  }\n  html.vortex-auth-document .page{\n    height:auto!important;\n    min-height:100vh!important;\n    max-height:none!important;\n    padding-top:calc(18px + env(safe-area-inset-top,0px))!important;\n    padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))!important;\n  }\n  html.vortex-auth-document .stage{min-height:0!important;}\n  html.vortex-auth-document form,\n  html.vortex-auth-document input,\n  html.vortex-auth-document textarea,\n  html.vortex-auth-document button,\n  html.vortex-auth-document a,\n  html.vortex-auth-document [role=button]{\n    pointer-events:auto!important;\n    touch-action:manipulation!important;\n  }\n  html.vortex-auth-document input,\n  html.vortex-auth-document textarea{\n    user-select:text!important;\n    -webkit-user-select:text!important;\n  }\n}\n
/* v59: never render a zero-count badge on iOS; hidden must beat display:flex */
.vortex-pwa-badge[hidden]{display:none!important}
