/* Pivotium customer portal v2 (22 Oct 2026, owner: "it should look like a portal where they have signed up").
   Loaded after site.css on /signup/, /dashboard/ and the unsubscribe page. Same brand tokens (site.css :root), light
   theme only. App shell: a left sidebar on wide screens, a sticky top tab bar on phones. */

/* ---------- the portal's own header ---------- */
.app-body { background: var(--bg-soft); }
.app-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.app-header-inner { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 clamp(16px, 3vw, 28px); max-width: 1360px; margin: 0 auto; }
.app-tag { padding: 3px 9px; border-radius: 999px; background: var(--tint-blue); color: var(--navy-2); font-size: 9.38px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.app-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 11.25px; font-weight: 600; }
.app-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.app-who::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22a55a; box-shadow: 0 0 0 3px rgba(34, 165, 90, .18); flex: none; }
.app-site { color: var(--ink-2); font-size: 11.25px; font-weight: 600; text-decoration: none; padding: 6px 8px; }
.app-site:hover { color: var(--ink); }
@media (max-width: 640px) { .app-who, .app-site { display: none; } }

/* ---------- the shell ---------- */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1360px; margin: 0 auto; min-height: calc(100vh - 61px); }
.app-side { position: sticky; top: 61px; align-self: start; height: calc(100vh - 61px); overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; background: #fff; border-right: 1px solid var(--line); }
.side-acc { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 16px; background: var(--grad-soft); border: 1px solid var(--line); min-width: 0; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; flex: none; box-shadow: 0 8px 20px -10px rgba(52, 86, 255, .8); }
.side-acc b { display: block; font-size: 12px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-acc small { display: block; color: var(--ink-3); font-size: 9.75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-acc > div { min-width: 0; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 700; font-size: 12px; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.side-nav a svg { width: 19px; height: 19px; flex: none; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--tint-blue); color: var(--navy-2); }
.badge { margin-left: auto; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 9.75px; font-weight: 800; }
.badge--soft { background: var(--bg-tint); color: var(--ink-2); }
.side-cta { margin-top: auto; padding: 18px; border-radius: 18px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, rgba(122, 92, 255, .55), rgba(122, 92, 255, 0) 60%), linear-gradient(160deg, #1A2370, #0E1442); box-shadow: var(--glow); display: grid; gap: 10px; }
.side-cta b { font-size: 13.5px; letter-spacing: -0.01em; line-height: 1.25; }
.side-cta p { color: #C5C9E8; font-size: 10.5px; }
.side-foot { display: grid; gap: 6px; font-size: 10.5px; }
.side-foot a, .side-foot button { color: var(--ink-3); }
.app-main { min-width: 0; padding: 28px clamp(16px, 3.2vw, 44px) 88px; }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side { position: sticky; top: 61px; z-index: 30; height: auto; flex-direction: row; padding: 8px 12px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .app-side::-webkit-scrollbar { display: none; }
  .side-acc, .side-cta, .side-foot { display: none; }
  .side-nav { flex: 1 0 auto; }
  .side-nav ul { display: flex; gap: 4px; }
  .side-nav a { padding: 9px 12px; font-size: 11.25px; white-space: nowrap; gap: 8px; }
  .side-nav a svg { width: 17px; height: 17px; }
  .badge { margin-left: 2px; }
  .app-main { padding-top: 20px; }
}
@media (max-width: 420px) { .side-nav a svg { display: none; } }

/* ---------- views ---------- */
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.view-head h1 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.035em; }
.view-head p { margin-top: 8px; color: var(--ink-2); font-size: 12px; max-width: 640px; }
.view-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.box + .box { margin-top: 18px; }
.box h2 { font-size: 14.25px; letter-spacing: -0.015em; }
.box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.box-head a { font-size: 11.25px; font-weight: 700; text-decoration: none; }
.loading { padding: 60px 0; text-align: center; color: var(--ink-3); }

/* overview */
.cta-card { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: clamp(22px, 3vw, 34px); border-radius: 24px; color: #fff; background: linear-gradient(125deg, #0E1442 0%, #1A2370 38%, #3426B0 72%, #6B4DFF 100%); box-shadow: var(--glow), var(--shadow); }
.cta-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 80% at 90% 10%, rgba(255, 255, 255, .18), transparent 70%); }
.cta-card h2 { font-size: clamp(19px, 2.3vw, 26px); letter-spacing: -0.03em; }
.cta-card p { margin-top: 10px; color: #D5D9FF; font-size: 12px; max-width: 560px; }
.cta-card ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #E4E7FF; font-size: 10.88px; font-weight: 700; }
.cta-card li::before { content: "\2713"; margin-right: 6px; color: #9DB0FF; }
.cta-card--quiet { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cta-card--quiet::after { display: none; }
.cta-card--quiet p { color: var(--ink-2); }
@media (max-width: 700px) { .cta-card { grid-template-columns: minmax(0, 1fr); } .cta-card .btn { width: 100%; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.tile { padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); display: grid; gap: 4px; }
.tile b { font-size: 24px; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--ink-3); font-size: 10.5px; font-weight: 700; }
a.tile:hover { border-color: #AEB9FF; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.two-col > .box + .box { margin-top: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.mini-req { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.mini-req:first-of-type { border-top: 0; padding-top: 0; }
.mini-req-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-req-top b { font-size: 12.75px; }
.mini-req p { color: var(--ink-2); font-size: 11.25px; }
.bar5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.bar5 i { height: 6px; border-radius: 3px; background: var(--bg-tint); }
.bar5 i.done { background: var(--grad); }
.bar5 i.now { background: linear-gradient(90deg, var(--blue) 50%, var(--bg-tint) 50%); }
.mini-msg { display: grid; gap: 3px; padding: 11px 0; border-top: 1px solid var(--line); }
.mini-msg:first-of-type { border-top: 0; padding-top: 0; }
.mini-msg small { color: var(--ink-3); font-size: 9.75px; font-weight: 700; }
.mini-msg p { color: var(--ink-2); font-size: 11.25px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.muted { color: var(--ink-3); }

/* my requests: the dated timeline */
.req { padding: 0; overflow: hidden; }
.req-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.req-head h2 { font-size: 16.5px; }
.req-meta { color: var(--ink-3); font-size: 10.5px; margin-top: 4px; }
.req-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 20px 24px 24px; }
@media (max-width: 900px) { .req-body { grid-template-columns: minmax(0, 1fr); } .req-head, .req-body { padding-left: 18px; padding-right: 18px; } }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li.done::before { background: linear-gradient(var(--blue), var(--violet)); }
.tl-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); color: #fff; }
.tl-dot svg { width: 14px; height: 14px; }
.tl li.done .tl-dot { background: var(--grad); border-color: transparent; }
.tl li.now .tl-dot { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(52, 86, 255, .14); }
.tl li.now .tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
@media (prefers-reduced-motion: no-preference) { .tl li.now .tl-dot { animation: tl-pulse 2.4s ease-in-out infinite; } }
@keyframes tl-pulse { 50% { box-shadow: 0 0 0 9px rgba(52, 86, 255, .06); } }
.tl-text { display: grid; gap: 2px; padding-top: 2px; }
.tl-text b { font-size: 12.38px; }
.tl li:not(.done):not(.now) .tl-text b { color: var(--ink-3); }
.tl-date { font-size: 10.5px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl li.now .tl-date { color: var(--blue); font-weight: 700; }
.next-box { padding: 16px 18px; border-radius: 16px; background: var(--grad-soft); border: 1px solid #DCE1FF; display: grid; gap: 8px; }
.next-box h3 { font-size: 11.25px; text-transform: uppercase; letter-spacing: .07em; color: var(--navy-2); }
.next-box p { color: var(--ink-2); font-size: 11.62px; }
.promise { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #1A2370, #0E1442); }
.promise svg { width: 22px; height: 22px; flex: none; }
.promise b { display: block; font-size: 12.75px; }
.promise small { color: #C5C9E8; font-size: 10.12px; }
.req-side { display: grid; gap: 14px; align-content: start; }
.req-side h3 { font-size: 11.25px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.req-tasks { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 11.62px; display: grid; gap: 4px; }

/* video gallery */
.vg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.vg-card { min-width: 0; display: flex; flex-direction: column; border-radius: 18px; background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s ease, transform .25s var(--ease), border-color .2s ease; }
.vg-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #C9D1FF; }
.vg-open { all: unset; cursor: pointer; display: block; }
.vg-open:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.vg-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #1E2A6C; overflow: hidden; }
.vg-thumb img, .vg-thumb video { width: 100%; height: 100%; object-fit: cover; }
.vg-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); transition: transform .2s var(--ease); }
.vg-play svg { width: 22px; height: 22px; margin-left: 3px; }
.vg-card:hover .vg-play { transform: scale(1.08); }
.vg-len { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(12, 16, 41, .8); color: #fff; font-size: 9.75px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vg-body { display: grid; gap: 8px; padding: 14px 16px 16px; }
.vg-title { font-size: 12.75px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.vg-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-3); font-size: 10.12px; font-weight: 600; }
.vg-gone { padding: 18px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 11.25px; background: #fff; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.player .btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.player .btn--ghost:hover { border-color: #fff; color: #fff; }
.player .pill { background: rgba(255, 255, 255, .12); color: #E4E7FF; }
.player .pill--ok { background: rgba(34, 165, 90, .22); color: #9BE2B5; }
.pv-note { color: #CDD2F5; font-size: 11.25px; }
.player video::cue { font-family: var(--font); font-size: 18px; line-height: 1.35; background: rgba(12, 16, 41, .82); color: #fff; }

/* messages: one conversation */
.thread-box { display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 0; overflow: hidden; }
.thread { display: grid; gap: 14px; align-content: start; padding: 22px; max-height: min(62vh, 640px); min-height: 280px; overflow-y: auto; background: linear-gradient(180deg, #FBFBFE, #fff); }
.bubble-row { display: flex; gap: 10px; align-items: flex-end; }
.bubble-row--me { flex-direction: row-reverse; }
.b-av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; font-weight: 800; font-size: 11.25px; color: #fff; background: var(--grad); }
.bubble-row--me .b-av { background: var(--bg-tint); color: var(--ink-2); }
.bubble { max-width: min(560px, 82%); padding: 11px 14px; border-radius: 16px 16px 16px 4px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 11.62px; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble-row--me .bubble { border-radius: 16px 16px 4px 16px; background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.b-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; font-size: 9.38px; font-weight: 700; opacity: .72; white-space: normal; }
.b-about { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(52, 86, 255, .1); color: var(--navy-2); }
.bubble-row--me .b-about { background: rgba(255, 255, 255, .16); color: #fff; }
.b-new { color: var(--blue); }
.day-sep { justify-self: center; padding: 3px 12px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-3); font-size: 9.75px; font-weight: 700; }
.composer { display: grid; gap: 10px; padding: 16px 22px 20px; border-top: 1px solid var(--line); background: #fff; }
.composer-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.composer .select { width: auto; max-width: 100%; padding: 9px 12px; font-size: 11.25px; }
.composer .textarea { min-height: 84px; }
@media (max-width: 560px) { .thread { padding: 16px; } .composer { padding: 14px 16px 16px; } .composer .select, .composer .btn { width: 100%; } .bubble { max-width: 86%; } }

/* account */
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.acc-grid > .box + .box { margin-top: 0; }
@media (max-width: 900px) { .acc-grid { grid-template-columns: minmax(0, 1fr); } }
.acc-form { display: grid; gap: 14px; margin-top: 14px; }
.acc-row { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); }
.acc-row:first-of-type { border-top: 0; }
.acc-row span { color: var(--ink-3); font-size: 10.5px; font-weight: 700; }
.acc-row b { font-size: 12.38px; overflow-wrap: anywhere; }
.switch-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-top: 12px; }
.switch-row p { color: var(--ink-2); font-size: 11.25px; }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background-color .2s ease; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(14, 20, 66, .25); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
.saved { color: var(--ok); font-size: 10.5px; font-weight: 700; }

/* the request form inside the portal */
.req-form { max-width: 820px; }
.req-form .form-card { box-shadow: var(--shadow-sm); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translateX(-50%); max-width: min(92vw, 560px); padding: 13px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 11.62px; font-weight: 600; box-shadow: var(--shadow-lg); }
.toast--err { background: var(--err); }

/* ---------- sign-up / sign-in ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; padding-bottom: 88px; }
@media (max-width: 960px) { .auth-shell { grid-template-columns: minmax(0, 1fr); } }
.auth-card { max-width: 560px; display: grid; gap: 16px; }
.auth-card h2 { font-size: 18px; letter-spacing: -0.02em; }
.auth-steps { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: 10.5px; font-weight: 700; }
.auth-steps i { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; background: var(--bg-tint); color: var(--ink-3); font-size: 9.75px; }
.auth-steps .on { color: var(--ink); }
.auth-steps .on i { background: var(--grad); color: #fff; }
.auth-steps .sep { flex: 0 0 22px; height: 1px; background: var(--line-2); }
.auth-switch { font-size: 11.25px; color: var(--ink-2); }

/* ---------- unsubscribe page (served by the Cloud Function through Hosting) ---------- */
.unsub-body { background: var(--bg-soft); }
.unsub { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.unsub-card { max-width: 520px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.unsub-card h1 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.03em; }
.unsub-card p { color: var(--ink-2); }
.box [data-gap] { margin-top: 10px; }
.acc-form .field + .field { margin-top: 0; }
.acc-form .composer-row { justify-content: flex-end; }
