/* 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}


/* v63: compact Now Downloading dock owns the space above bottom navigation. */
body.vortex-download-dock-active [aria-label="Open quick menu"]{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}


/* v65 — Mobile finishing pass */
@media(max-width:700px){
  .vortex-bottom-nav{
    height:54px!important;min-height:54px!important;max-height:54px!important;
    left:10px!important;right:10px!important;border-radius:17px!important;
    padding-top:3px!important;padding-bottom:3px!important;
    transition:transform .2s ease,opacity .2s ease,box-shadow .2s ease!important;
  }
  .vortex-bottom-nav [role="tab"]{min-height:42px!important;transition:transform .12s ease,opacity .12s ease!important;}
  .vortex-bottom-nav [role="tab"]:active{transform:scale(.94)!important;}
  [aria-label="Open quick menu"]{width:46px!important;height:46px!important;border-radius:15px!important;bottom:calc(66px + max(8px,var(--vortex-safe-bottom)))!important;transition:transform .16s ease,opacity .18s ease!important;}
  button,a,[role="button"]{ -webkit-tap-highlight-color:transparent; }
  button:active,a:active,[role="button"]:active{filter:brightness(.96);}
  .vortex-swipe-row{-webkit-overflow-scrolling:touch!important;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;scrollbar-width:none;}
  .vortex-swipe-row::-webkit-scrollbar{display:none;}
  .vortex-swipe-row>*{scroll-snap-align:start;}
  body.vortex-route-transition #root{opacity:.988;transform:translateY(2px);}
  body.vortex-mobile-polish #root{transition:opacity .18s ease,transform .18s ease;}
}

.vortex-route-progress{position:fixed;z-index:2147483644;top:env(safe-area-inset-top,0px);left:0;height:2px;width:100%;pointer-events:none;overflow:hidden;background:transparent;}
.vortex-route-progress::after{content:"";position:absolute;inset:0 auto 0 0;width:28%;border-radius:999px;background:linear-gradient(90deg,#7c4dff,#a36bff,#6fd8ff);box-shadow:0 0 14px rgba(124,77,255,.65);transform:translateX(-130%);}
.vortex-route-progress-run::after{animation:vortexRouteProgress .58s cubic-bezier(.2,.7,.25,1) forwards;}
@keyframes vortexRouteProgress{0%{transform:translateX(-130%);width:24%}60%{width:48%}100%{transform:translateX(360%);width:36%}}

.vortex-offline-banner{position:fixed;z-index:2147483643;top:calc(env(safe-area-inset-top,0px) + 8px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;max-width:calc(100vw - 28px);padding:8px 12px;border-radius:999px;background:rgba(10,20,38,.96);border:1px solid rgba(255,181,71,.34);color:#eef4ff;font:700 11px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 26px rgba(0,0,0,.38);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);white-space:nowrap;}
.vortex-offline-dot{width:8px;height:8px;border-radius:50%;background:#ffb547;box-shadow:0 0 10px rgba(255,181,71,.72);flex:0 0 auto;}

.vortex-pull-indicator{--vortex-pull:0;position:fixed;z-index:2147483642;top:calc(env(safe-area-inset-top,0px) + 8px);left:50%;transform:translate(-50%,-18px) scale(calc(.88 + .12 * var(--vortex-pull)));opacity:0;display:flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:rgba(9,18,35,.96);border:1px solid rgba(139,92,246,.32);color:#dce7ff;font:800 11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 28px rgba(0,0,0,.4);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);pointer-events:none;transition:opacity .14s ease,transform .14s ease,border-color .14s ease;}
.vortex-pull-visible{opacity:1;transform:translate(-50%,0) scale(calc(.88 + .12 * var(--vortex-pull)));}
.vortex-pull-icon{font-size:16px;line-height:1;display:inline-block;transform:rotate(calc(220deg * var(--vortex-pull)));transition:transform .08s linear;}
.vortex-pull-armed{border-color:rgba(139,92,246,.72);color:#fff;}
.vortex-pull-refreshing .vortex-pull-icon{animation:vortexSpin .7s linear infinite;}
@keyframes vortexSpin{to{transform:rotate(360deg)}}

.vortex-swipe-back{--vortex-swipe:0;position:fixed;z-index:2147483641;left:8px;top:50%;width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(9,18,35,.94);border:1px solid rgba(139,92,246,.36);color:#fff;font:400 34px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 28px rgba(0,0,0,.42);opacity:0;transform:translate(calc(-38px + 34px * var(--vortex-swipe)),-50%) scale(calc(.82 + .18 * var(--vortex-swipe)));pointer-events:none;transition:opacity .12s ease,transform .12s ease;}
.vortex-swipe-visible{opacity:calc(.45 + .55 * var(--vortex-swipe));}
.vortex-swipe-commit{border-color:rgba(139,92,246,.85);box-shadow:0 0 22px rgba(139,92,246,.38);}

@media(prefers-reduced-motion:reduce){
  .vortex-bottom-nav,[aria-label="Open quick menu"],body.vortex-mobile-polish #root,.vortex-pull-indicator,.vortex-swipe-back{transition:none!important;animation:none!important;}
  .vortex-route-progress{display:none!important;}
}


/* v68 Premium Notification Centre */
#vortex-device-alert-panel{margin:10px 0 14px;padding:15px;border-radius:16px;background:linear-gradient(145deg,rgba(24,27,40,.98),rgba(10,12,20,.98));border:1px solid rgba(138,92,246,.24);box-shadow:0 14px 34px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.035);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff}
.vortex-device-alert-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.vortex-device-alert-kicker{font-size:10px;font-weight:800;letter-spacing:1.25px;color:#9b8cff;margin-bottom:4px}.vortex-device-alert-title{font-size:15px;font-weight:750;letter-spacing:-.2px}.vortex-device-alert-status{flex:none;font-size:10px;font-weight:800;padding:5px 8px;border-radius:999px;border:1px solid transparent}.vortex-device-alert-status.on{color:#8df0ba;background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.24)}.vortex-device-alert-status.warn{color:#ffd37a;background:rgba(245,158,11,.11);border-color:rgba(245,158,11,.22)}.vortex-device-alert-status.off{color:#ff9a9a;background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.2)}
.vortex-device-alert-help{font-size:12px;line-height:1.45;color:#9ca7bd;margin-top:9px}.vortex-device-alert-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.vortex-device-alert-actions button{appearance:none;border:0;border-radius:11px;min-height:38px;padding:0 12px;font:700 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;background:linear-gradient(135deg,#6f4cff,#9468ff);box-shadow:0 7px 18px rgba(111,76,255,.18)}.vortex-device-alert-actions button:nth-child(2){background:rgba(255,255,255,.07);box-shadow:none;border:1px solid rgba(255,255,255,.08)}.vortex-device-alert-actions button.danger{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.2);color:#ff9d9d;box-shadow:none}
@media(max-width:700px){#vortex-device-alert-panel{margin-left:0;margin-right:0}.vortex-device-alert-actions button{flex:1 1 auto}}
