/* Account and workspace share the material, mark and type of the Foldline landing page. */
/* The shared palette and page background live in base.css, before JavaScript runs. */
body[data-view="portal"] .pw-shell {
  --pbase: var(--bg);
  --pfill: #10212a;
  --pfill2: #172c32;
  --pedge: var(--line);
  --pink: var(--ink);
  --pdim: var(--muted);
  --paccent: var(--lime);
  --pcyan: var(--cyan);
  --pradius: 6px;
  background: transparent;
}
.pw-shell .pw-aside { background: linear-gradient(160deg, #101f27, #08161e 72%); }
.pw-shell .pw-workspace {
  border: 0;
  border-block: 1px solid var(--pedge);
  border-radius: 0;
  padding: .8rem .45rem;
  background: none;
}
.pw-shell .pw-workspace-mark {
  background: linear-gradient(140deg, #2b3c3c, #15252c 58%, #37453a);
  border: 1px solid #52665f;
  border-radius: 4px;
}
.pw-shell .pw-top { background: #0b1b23f2; }
.pw-shell .pw-nav-group a { border-radius: 4px; }
.pw-shell .pw-nav-group a[aria-current=page] {
  color: var(--paccent);
  border-color: transparent;
  border-left-color: var(--paccent);
  background: linear-gradient(90deg, #b7d24b1a, #18303955);
}
.pw-shell .pw-content { min-width: 0; }
.pw-shell .pw-page-head {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
  min-height: clamp(120px, 10.5vw, 194px);
  padding-block: .8rem;
  border-bottom: 1px solid var(--pedge);
}
.pw-shell .pw-page-head::before {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
  inset: -12% 0 0 28%;
  background: url("/foldline/assets/foldline.webp") right 49% / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 68%), linear-gradient(0deg, transparent, #000 23% 84%, transparent);
  mask-composite: intersect;
  opacity: .85;
}
.pw-shell .pw-page-head h1 {
  max-width: 76%;
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -.058em;
  text-shadow: 0 2px 14px #07141c;
}
.pw-shell .pw-page-head > p:last-child { max-width: min(72%, 67ch); color: #c5d4d5; }
.pw-shell .pw-eyebrow { color: #b4c8c9; font-weight: 500; letter-spacing: .12em; }
.pw-shell :is(.pw-panel, .pwc-card) {
  border-color: var(--pedge);
  background: linear-gradient(128deg, #14272e, #0d1d25 65%, #10212a);
}
.pw-shell :is(.pw-panel, .pwc-card, .pw-stat) { box-shadow: none; }
.pw-shell :is(.pw-panel-head h2, .pwc-head h2) { font-weight: 570; letter-spacing: -.041em; }
.pw-shell .pw-stat {
  border-radius: 0;
  border-width: 1px 0 0;
  background: linear-gradient(165deg, #24394180, #13252c3d 61%, transparent);
}
.pw-shell .pw-stat > strong { font-weight: 570; }
.pw-shell .bw-priority > .pw-panel {
  background: linear-gradient(100deg, #13272f, #11252df9 55%, #162b33d9),
    url("/foldline/assets/foldline.webp") right 49% / cover;
  border-color: #445a61;
  box-shadow: inset 2px 0 #c0d441;
}
.pw-shell .pw-overview-banner {
  background: linear-gradient(95deg, #0f232bef 10%, #12242de5 48%, #10232a77),
    url("/foldline/assets/foldline.webp") right center / cover;
}
.pw-shell .pw-action-tile { border-color: var(--pedge); background: #13262c; border-radius: 4px; }
.pw-shell .pw-action-tile:hover { border-color: #819591; }
.pw-shell .pw-field :is(input, select, textarea) { border-radius: 4px; background: #0a1921; border-color: #53676e; }
.pw-shell .pw-button:not(.secondary, .danger) { background: var(--paccent); color: #101c13; border-radius: 4px; }
.pw-shell :is(.pw-tabs a, .pwc-controls, .pw-tabs a[aria-current=page]) { border-radius: 4px; }
.pw-shell :is(.pw-account > div, .pw-button.secondary, .pw-tabs a, .pwc-controls) { background: #14272e; }
.pw-shell .pw-tabs a[aria-current=page] { color: var(--paccent); background: #26362a; }
.pw-shell .pw-scroll th, .pw-shell .pwc-table-scroll thead th { background: #182c34; }
body[data-view="portal"] .pw-dialog, body[data-view="portal"] .pw-toast { background: #15272f; border-color: #60767b; border-radius: 6px; }
@media (min-width: 1800px) {
  .pw-shell .pw-content { padding-inline: clamp(52px, 3.4vw, 82px); }
}
@media (max-width: 680px) {
  .pw-shell .pw-page-head { min-height: 110px; }
  .pw-shell .pw-page-head::before { left: 32%; opacity: .55; background-position: 72% 48%; }
  .pw-shell .pw-page-head h1 { max-width: 89%; }
  .pw-shell .pw-page-head > p:last-child { max-width: 83%; }
}

.pw-referral {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem 1.5rem;
  margin-bottom: 1.2rem; padding: 1rem 1.25rem; border: 1px solid var(--pedge); border-radius: 6px; background: var(--pfill);
}
.pw-referral h2, .pw-referral p { margin: 0; }
.pw-referral h2 { font-size: 1.1rem; }
.pw-referral p { margin-top: .2rem; color: var(--pdim); font-size: .88rem; }
.pw-referral-copy { display: flex; flex: 1 1 22rem; max-width: 34rem; min-width: 0; gap: .5rem; }
.pw-referral-copy input { flex: 1; min-width: 0; padding: .65rem; color: var(--pink); background: var(--pbase); border: 1px solid var(--pedge); border-radius: 4px; font: inherit; }
.pw-referral-copy button { flex: none; }
.pw-invest-action { margin: 0 0 1rem; }
.pw-row-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.pw-payment-records .pw-button { min-height: 2.3rem; padding: .4rem .65rem; white-space: nowrap; }
.pw-dialog.pw-receipt-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: 88dvh; overflow-y: auto; }
.pw-receipt-dialog header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.pw-receipt-dialog .op-proof { border-color: #415860; }
.pw-receipt-dialog .op-proof a { color: #e2f2f2; }
.pw-decision-form { display: grid; gap: .75rem; }
.pw-decision-form textarea { width: 100%; padding: .6rem; font: inherit; color: #eff5f4; background: #0a1921; border: 1px solid #53676e; border-radius: 4px; }
.pw-decision-form button { justify-self: start; }
.pw-decision-form [role="alert"] { color: #ffc1bd; }
.pw-bottom-nav { display: none; }
@media (max-width: 960px) {
  .pw-shell .pw-main { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
  .pw-bottom-nav {
    position: fixed; inset: auto 0 0; z-index: 15; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom)); background: #0c2029; border-top: 1px solid var(--pedge);
  }
  .pw-bottom-nav :is(a,button) { display: grid; place-content: center; justify-items: center; gap: .2rem; min-height: 3.25rem; border: 0; border-radius: 4px; background: transparent; color: var(--pdim); font-family: inherit; font-size: .7rem; font-weight: 600; line-height: 1.15; text-decoration: none; cursor: pointer; }
  .pw-bottom-nav .pw-icon { width: 1.22rem; height: 1.22rem; }
  .pw-bottom-nav :is(a,button):focus-visible { outline: 2px solid var(--paccent); outline-offset: -2px; }
  .pw-bottom-nav a[aria-current="page"] { background: #26362a; color: var(--paccent); }
  body[data-view="portal"] .pw-toast { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .pw-payment-records .pw-records tr:not([data-expanded]) td:is([data-column="Action"],[data-column="Screenshot"]) {
    display: block; max-width: none; padding: .3rem .1rem .45rem; border: 0;
  }
}
