body.mobile-product.prime-active {
  background: #080b11;
}

body.mobile-product.prime-active .mobile-shell {
  display: none !important;
}

body.mobile-product:not(.prime-active) .prime-login,
body.mobile-product:not(.prime-active) .prime-app,
body.mobile-product:not(.prime-active) .prime-drawer,
body.mobile-product:not(.prime-active) .prime-modal,
body.mobile-product:not(.prime-active) .prime-toast {
  display: none !important;
}

.prime-login,
.prime-app,
.prime-drawer,
.prime-modal,
.prime-toast {
  box-sizing: border-box;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.prime-login *,
.prime-app *,
.prime-drawer *,
.prime-modal * {
  box-sizing: border-box;
}

.prime-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(21, 60, 77, .9) 0, transparent 38%),
    linear-gradient(160deg, #091019, #0c1722 60%, #090b11);
  color: #f8fafc;
}

.prime-login.hide {
  display: none;
}

.prime-login-box {
  width: min(355px, 92vw);
  text-align: center;
}

.prime-login-logo {
  width: 92px;
  height: 92px;
  margin: auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #24c08b, #4f86f7);
  box-shadow: 0 18px 46px rgba(49, 94, 135, .5);
  font-size: 28px;
  font-weight: 950;
  overflow: hidden;
}

.prime-login-logo img,
.prime-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prime-login h1 {
  margin: 18px 0 7px;
  font-size: 26px;
}

.prime-login p,
.prime-login small {
  color: #8e9aac;
  font-size: 12px;
}

.prime-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px;
}

.prime-dot {
  width: 13px;
  height: 13px;
  border: 1px solid #557b76;
  border-radius: 50%;
}

.prime-dot.on {
  background: #29d58a;
  border-color: #29d58a;
  box-shadow: 0 0 14px #29d58a;
}

.prime-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.prime-key {
  height: 58px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.prime-secondary,
.prime-key {
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}

.prime-key:active,
.prime-secondary:active,
.prime-quick button:active,
.prime-asset:active,
.prime-setting:active {
  transform: scale(.985);
  filter: brightness(1.12);
}

.prime-pin-error {
  height: 22px;
  margin-top: 12px;
  color: #ff7284;
  font-size: 11px;
}

.prime-secondary {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: #131b27;
  color: #d4dae3;
}

.prime-app {
  max-width: 520px;
  min-height: 100vh;
  margin: auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 62, 105, .31), transparent 30%),
    radial-gradient(circle at 0 30%, rgba(11, 89, 73, .23), transparent 28%),
    linear-gradient(180deg, #0c121c, #0a1017 55%, #080b11);
  color: #f8fafc;
}

.prime-top {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 15px 12px;
  background: rgba(10, 15, 23, .94);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.prime-logo {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #24c08b, #4f86f7);
  box-shadow: 0 12px 28px rgba(49, 94, 135, .25);
  font-weight: 950;
  overflow: hidden;
}

.prime-brand {
  flex: 1;
}

.prime-brand b {
  font-size: 15px;
}

.prime-brand small {
  display: block;
  margin-top: 3px;
  color: #778396;
  font-size: 8px;
  letter-spacing: 1.1px;
}

.prime-topbtn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background: #121925;
  color: #fff;
}

.prime-page {
  display: none;
  padding: 12px 15px 98px;
}

.prime-page.active {
  display: block;
}

.prime-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px 2px 13px;
}

.prime-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(145deg, #27b985, #4f86f7);
}

.prime-welcome h1 {
  margin: 0;
  font-size: 20px;
}

.prime-welcome p {
  margin: 4px 0 0;
  color: #8e9aac;
  font-size: 10px;
}

.prime-hero {
  padding: 21px;
  border-radius: 25px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .09), transparent 23%),
    linear-gradient(135deg, #123f43, #176b75 48%, #3e66c8);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .27);
}

.prime-eyebrow {
  color: #d8fff3;
  font-size: 9px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.prime-balance {
  margin: 7px 0;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -1.3px;
}

.prime-gain,
.prime-up {
  color: #42e39f;
}

.prime-down {
  color: #ff7284;
}

.prime-metrics,
.prime-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 15px;
}

.prime-metric,
.prime-mini,
.prime-card,
.prime-chart-card,
.prime-history,
.prime-asset {
  border: 1px solid rgba(255, 255, 255, .08);
  background: #111823;
}

.prime-metric {
  padding: 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .05);
}

.prime-metric small,
.prime-mini small {
  display: block;
  color: rgba(255, 255, 255, .68);
  font-size: 7px;
}

.prime-metric b,
.prime-mini b {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}

.prime-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.prime-quick button {
  padding: 12px 4px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 17px;
  background: #121925;
  color: #fff;
}

.prime-quick i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 6px;
  font-style: normal;
  font-size: 18px;
}

.prime-quick button:nth-child(1) i { background: #123a2e; color: #42e3a5; }
.prime-quick button:nth-child(2) i { background: #132d4b; color: #78a5ff; }
.prime-quick button:nth-child(3) i { background: #3b2d14; color: #ffc568; }
.prime-quick button:nth-child(4) i { background: #2d2149; color: #b9a3ff; }

.prime-quick span {
  font-size: 8px;
  font-weight: 800;
}

.prime-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 22px 2px 11px;
}

.prime-title h2 {
  margin: 0;
  font-size: 15px;
}

.prime-title span {
  color: #8e9aac;
  font-size: 9px;
}

.prime-mini {
  padding: 12px;
  border-radius: 17px;
}

.prime-mini:nth-child(1) { background: linear-gradient(145deg, #152033, #101722); }
.prime-mini:nth-child(2) { background: linear-gradient(145deg, #261d35, #15151f); }
.prime-mini:nth-child(3) { background: linear-gradient(145deg, #102b25, #0e1918); }

.prime-chart-card,
.prime-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(150deg, #111926, #141a25);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .27);
}

.prime-chart-head {
  display: flex;
  justify-content: space-between;
}

.prime-chart-head small {
  color: #8c98aa;
  font-size: 8px;
}

.prime-chart-head b {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.prime-badge {
  padding: 6px 8px;
  border-radius: 9px;
  background: #173d30;
  color: #6aebb1;
  font-size: 8px;
}

.prime-canvas {
  width: 100%;
  height: 235px;
  display: block;
  margin-top: 7px;
  touch-action: none;
}

.prime-ranges,
.prime-filters,
.prime-tabs {
  display: flex;
  gap: 6px;
}

.prime-ranges button,
.prime-filter,
.prime-tabs button {
  flex: 1;
  padding: 8px 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: #0e151f;
  color: #7e8999;
  font-size: 8px;
  cursor: pointer;
  touch-action: manipulation;
}

.prime-ranges button.active,
.prime-filter.active,
.prime-tabs button.active {
  background: #15382f;
  color: #78efbb;
  border-color: #216d56;
}

.prime-history {
  padding: 0 14px;
  border-radius: 18px;
}

.prime-hrow,
.prime-position,
.prime-row {
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.prime-hrow {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
}

.prime-hrow:last-child,
.prime-position:last-child,
.prime-row:last-child {
  border: 0;
}

.prime-hico,
.prime-aicon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #1a2432;
  font-weight: 900;
}

.prime-hrow b,
.prime-position b,
.prime-asset b {
  font-size: 10px;
}

.prime-hrow small,
.prime-position small,
.prime-asset small {
  display: block;
  margin-top: 4px;
  color: #7f8b9c;
  font-size: 8px;
}

.prime-search-wrap {
  position: sticky;
  top: 68px;
  z-index: 45;
  padding: 10px 0;
  background: #0a1017;
}

.prime-search {
  height: 52px;
  border: 1px solid #294055;
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  background: #101823;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .27);
}

.prime-search input,
.prime-input,
.prime-feed-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .08);
  outline: 0;
  border-radius: 13px;
  background: #0e151f;
  color: #fff;
}

.prime-search input {
  border: 0;
  background: transparent;
  font-size: 13px;
}

.prime-filters {
  overflow: auto;
  padding: 2px 0 12px;
}

.prime-filter {
  flex: 0 0 auto;
  white-space: nowrap;
}

.prime-assets {
  display: grid;
  gap: 8px;
}

.prime-asset,
.prime-position {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .13);
}

.prime-aprice,
.prime-posval {
  text-align: right;
}

.prime-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.prime-row span,
.prime-row b {
  font-size: 10px;
}

.prime-row span {
  color: #8d99aa;
}

.prime-note {
  margin: 12px 2px 0;
  color: #9aa8ba;
  font-size: 12px;
  line-height: 1.45;
}

.prime-bottom {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 0;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(8, 12, 18, .96);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.prime-bottom button {
  border: 0;
  background: transparent;
  color: #748093;
  padding: 7px 2px;
  font-size: 7px;
  cursor: pointer;
  touch-action: manipulation;
}

.prime-bottom button b {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.prime-bottom button.active {
  color: #44dba1;
}

.prime-drawer {
  position: fixed;
  z-index: 300;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(355px, 88vw);
  padding: 24px 17px;
  background: #0e141e;
  border-left: 1px solid rgba(255, 255, 255, .08);
  color: #f8fafc;
  transform: translateX(105%);
  transition: .28s;
}

.prime-drawer.open {
  transform: translateX(0);
}

.prime-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.prime-drawer button {
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #d0d5df;
  text-align: left;
}

.prime-license {
  position: absolute;
  bottom: 24px;
  color: #6f7a8b;
  font-size: 9px;
  line-height: 1.6;
}

.prime-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 6, 12, .8);
}

.prime-modal.open {
  display: flex;
}

.prime-sheet {
  width: min(520px, 100%);
  max-height: 94vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #283443;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, #141c28, #0d131c);
  color: #f8fafc;
}

.prime-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prime-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  background: #192331;
  color: #fff;
}

.prime-input {
  height: 48px;
  padding: 0 13px;
  margin-top: 10px;
}

.prime-feed {
  max-height: 300px;
  overflow: auto;
  padding: 6px 0;
}

.prime-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 13px;
  margin-bottom: 8px;
  background: #192230;
  font-size: 9px;
  line-height: 1.5;
}

.prime-bubble.me {
  margin-left: auto;
  background: #15382f;
}

.prime-settings-grid {
  display: grid;
  gap: 9px;
}

.prime-setting {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  background: #111823;
  color: #fff;
  text-align: left;
}

.prime-setico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #172331;
}

.prime-setting b {
  font-size: 10px;
}

.prime-setting small {
  display: block;
  margin-top: 3px;
  color: #7f8b9c;
  font-size: 7px;
}

.prime-toast {
  position: fixed;
  z-index: 800;
  left: 50%;
  bottom: 96px;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  padding: 12px 15px;
  border: 1px solid #274a3c;
  border-radius: 13px;
  background: #12342a;
  color: #fff;
  font-size: 10px;
  transition: .2s;
}

.prime-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 900px) {
  .prime-app {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: 1fr;
    margin: 0;
    border-left: 0;
    border-right: 0;
    overflow: visible;
  }

  .prime-top {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    display: grid;
    grid-template-columns: 62px 1fr;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 12px;
    padding: 24px 18px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(10, 15, 23, .98), rgba(9, 13, 20, .98));
  }

  .prime-logo {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .prime-brand {
    align-self: center;
  }

  .prime-brand b {
    font-size: 18px;
  }

  .prime-brand small {
    font-size: 9px;
  }

  .prime-topbtn {
    grid-column: 1 / -1;
    width: 100%;
    height: 48px;
    border-radius: 14px;
    justify-content: flex-start;
    padding: 0 15px;
    color: #dce6f5;
    background: rgba(255, 255, 255, .045);
  }

  .prime-topbtn[data-prime-action="notifications"]::after {
    content: "Notifications";
    margin-left: 12px;
    font-size: 14px;
    font-weight: 800;
  }

  .prime-topbtn[data-prime-action="drawer"]::after {
    content: "More actions";
    margin-left: 12px;
    font-size: 14px;
    font-weight: 800;
  }

  .prime-topbtn[data-prime-action="drawer"] {
    display: none;
  }

  .prime-app main {
    grid-column: 2;
    min-width: 0;
  }

  .prime-page {
    padding: 28px 34px 70px;
  }

  .prime-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 22px;
    align-items: start;
  }

  .prime-bottom {
    left: 0;
    right: auto;
    top: 190px;
    bottom: auto;
    width: 280px;
    transform: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 0 18px;
    border-top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .prime-bottom button {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 850;
    text-align: left;
  }

  .prime-bottom button b {
    display: inline;
    margin: 0;
    font-size: 20px;
  }

  .prime-bottom button.active {
    background: linear-gradient(135deg, rgba(41, 213, 138, .2), rgba(79, 134, 247, .24));
    border-color: rgba(79, 134, 247, .42);
    color: #f8fafc;
  }

  .prime-quick {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .prime-quick button,
  .prime-secondary,
  .prime-filter,
  .prime-tabs button {
    min-height: 48px;
    font-size: 14px;
  }

  .prime-ranges button {
    min-height: 42px;
    font-size: 13px;
  }

  .prime-hero,
  .prime-chart-card,
  .prime-card {
    border-radius: 20px;
  }

  .prime-drawer {
    left: auto;
    right: 0;
    width: 360px;
    transform: translateX(105%);
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-right: 0;
  }

  .prime-drawer.open {
    transform: translateX(0);
  }

  .prime-modal {
    align-items: center;
    padding-left: 280px;
  }

  .prime-sheet {
    border-radius: 24px;
  }

  .prime-toast {
    left: calc(50% + 140px);
  }
}
