/* Member Portal dashboard v2 (19 Nov 2026). Uses the site tokens from styles.css. */
.pv-page { max-width: 1360px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.pv-muted { color: var(--muted, #626e68); }
.pv-small { font-size: 13px; }
.pv-pos { color: #15803d; }
.pv-neg { color: #b42318; }
.pv-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.pv-hero h1 { margin: 6px 0 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; }
.pv-hero p { margin: 6px 0 0; }
.pv-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--teal, #0f766e); display: flex; align-items: center; gap: 10px; }
.pv-tier { padding: 3px 10px; border-radius: 999px; background: #f4ecdd; color: #7a5210; letter-spacing: 0; }
.pv-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line, #dce5e1); background: #fff; color: var(--ink, #151817); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.pv-btn:hover { border-color: #b9d8d2; }
.pv-btn-primary { background: var(--teal, #0f766e); border-color: var(--teal, #0f766e); color: #fff; min-height: 44px; padding: 0 18px; }
.pv-btn-primary:hover { background: var(--teal-dark, #0b4f4a); color: #fff; }
.pv-btn-danger { color: #b42318; }
.pv-btn[disabled] { opacity: .5; cursor: default; }
.pv-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-pages a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line, #dce5e1); color: #394744; font-size: 14px; font-weight: 600; text-decoration: none; }
.pv-pages a:hover { background: #e6f2f0; color: var(--teal-dark, #0b4f4a); }
.pv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pv-kpi { background: #fff; border: 1px solid var(--line, #dce5e1); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-kpi-label { font-size: 12px; font-weight: 600; color: var(--muted, #626e68); }
.pv-kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.pv-kpi-note { font-size: 13px; color: var(--muted, #626e68); }
.pv-card { background: #fff; border: 1px solid var(--line, #dce5e1); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-card h2 { margin: 0; font-size: 19px; }
.pv-card p { margin: 0; }
.pv-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pv-link { font-size: 14px; font-weight: 600; color: var(--teal, #0f766e); }
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line, #dce5e1); background: #fff; color: #394744; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pv-chip-on { background: var(--teal, #0f766e); border-color: var(--teal, #0f766e); color: #fff; }
.pv-table-wrap { overflow-x: auto; }
.pv-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14px; }
.pv-table th { text-align: left; color: var(--muted, #626e68); font-size: 12px; font-weight: 600; padding: 8px 10px; }
.pv-table td { padding: 12px 10px; border-top: 1px solid #eef1f0; vertical-align: middle; }
.pv-table .pv-num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-ytd-head { width: 230px; }
.pv-model-name { font-weight: 600; color: var(--ink, #151817); text-decoration: none; }
.pv-model-name:hover { color: var(--teal-dark, #0b4f4a); }
.pv-tag { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e6f2f0; color: var(--teal-dark, #0b4f4a); white-space: nowrap; }
.pv-tag-mine { background: #e3ecf3 !important; color: #2b5a78 !important; }
.pv-ytd { display: flex; align-items: center; gap: 10px; }
.pv-ytd b { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.pv-bar { flex: 1; height: 8px; border-radius: 4px; background: #eef1f0; overflow: hidden; }
.pv-bar > span { display: block; height: 8px; background: var(--teal, #0f766e); border-radius: 4px; }
.pv-bar > span.pv-bar-mine { background: #2b5a78; }
.pv-bar > span.pv-bar-neg { background: #c2410c; }
.pv-actions { text-align: right; white-space: nowrap; }
.pv-actions > a { font-weight: 600; color: var(--teal, #0f766e); margin-right: 10px; }
.pv-menu { display: inline-block; position: relative; }
.pv-menu summary { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line, #dce5e1); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.pv-menu summary::-webkit-details-marker { display: none; }
.pv-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px; background: #fff; border: 1px solid var(--line, #dce5e1); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; display: grid; text-align: left; }
.pv-menu-list a, .pv-menu-list button { padding: 9px 10px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink, #151817); text-align: left; cursor: pointer; text-decoration: none; white-space: normal; }
.pv-menu-list a:hover, .pv-menu-list button:hover { background: #f1f6f4; }
.pv-menu-list button { color: #b42318; }
.pv-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pv-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pv-cal-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start; }
.pv-cal-date { background: #eef1f0; color: #0b3d39; border-radius: 12px; padding: 10px 0; text-align: center; display: flex; flex-direction: column; }
.pv-cal-date span { font-size: 12px; font-weight: 600; }
.pv-cal-date b { font-size: 26px; font-weight: 800; }
.pv-cal-next { background: var(--teal, #0f766e); color: #fff; }
.pv-cal-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-cal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-cal-chip { padding: 4px 10px; border-radius: 999px; background: #eef1f0; font-size: 12px; }
.pv-cal-portfolio { background: #f4ecdd; color: #7a5210; }
.pv-divider { height: 1px; background: #eef1f0; margin: 14px 0; }
.pv-empty { border: 2px dashed #b9d8d2; border-radius: 12px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 6px; background: #f4faf8; }
.pv-empty strong { color: var(--teal-dark, #0b4f4a); }
.pv-empty span { font-size: 13px; color: var(--muted, #626e68); }
.pv-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #eef1f0; border-radius: 12px; }
.pv-item + .pv-item { margin-top: 8px; }
.pv-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-item-text a { color: var(--ink, #151817); text-decoration: none; }
.pv-tickers { font-weight: 600; word-spacing: 3px; }
.pv-item-actions { display: flex; align-items: center; gap: 8px; }
.pv-views { font-size: 13px; font-weight: 700; margin-right: 4px; }
.pv-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.pv-tools a { background: #fff; border: 1px solid var(--line, #dce5e1); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink, #151817); text-decoration: none; }
.pv-tools a:hover { border-color: #b9d8d2; }
.pv-tools span { font-size: 13px; color: var(--muted, #626e68); }
.pv-loading .pv-kpis, .pv-loading #pvModelsBody { opacity: .4; }
@media (max-width: 1100px) {
  .pv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-two { grid-template-columns: minmax(0, 1fr); }
}
/* Phone layout (19 Nov 2026): compact header, 2-column cards, the model table as a card list */
@media (max-width: 700px) {
  .pv-page { padding: 16px 16px 40px; gap: 16px; }
  .pv-kicker { display: none; }                       /* the top bar already shows Member Portal and the tier */
  .pv-hero { align-items: stretch; }
  .pv-hero h1 { font-size: 26px; margin: 0; }
  .pv-hero p { font-size: 14px; }
  .pv-hero-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .pv-hero-actions .pv-btn { min-height: 44px; padding: 0 10px; }
  .pv-pages { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .pv-pages::-webkit-scrollbar { display: none; }
  .pv-pages a { flex: none; padding: 8px 12px; font-size: 13px; }
  .pv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pv-kpi { padding: 12px 14px; border-radius: 14px; gap: 4px; }
  .pv-kpi-label { font-size: 11px; }
  .pv-kpi-value { font-size: 22px; }
  .pv-kpi-note { font-size: 12px; line-height: 1.35; }
  .pv-card { padding: 16px; border-radius: 14px; gap: 12px; }
  .pv-card h2 { font-size: 17px; }
  .pv-chip { min-height: 34px; padding: 0 12px; font-size: 12px; }
  /* models: one card per model */
  .pv-table-wrap { overflow: visible; }
  .pv-table { min-width: 0; }
  .pv-table thead { display: none; }
  .pv-table, .pv-table tbody { display: block; }
  .pv-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 0; border-top: 1px solid #eef1f0; }
  .pv-table tbody tr:first-child { border-top: 0; padding-top: 0; }
  .pv-table td { display: block; padding: 0; border: 0; }
  .pv-table .pv-c-name { flex: 1 1 60%; min-width: 0; order: 1; }
  .pv-table .pv-c-ytd { order: 2; flex: none; }
  .pv-table .pv-c-ytd .pv-bar { display: none; }
  .pv-table .pv-c-ytd b { width: auto; font-size: 17px; }
  .pv-table .pv-c-region { order: 3; flex: 1 0 100%; font-size: 13px; }
  .pv-table .pv-c-stat { order: 4; flex: none; text-align: left; font-size: 13px; }
  .pv-table .pv-c-stat::before { content: attr(data-label) " "; color: var(--muted, #626e68); font-weight: 600; }
  .pv-table .pv-actions { order: 5; flex: 1 0 100%; text-align: left; display: flex; align-items: center; gap: 12px; margin-top: 4px; }
  .pv-table .pv-actions > a { margin: 0; }
  .pv-menu-list { right: auto; left: 0; }
  .pv-cal-row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .pv-cal-date { padding: 8px 0; border-radius: 10px; }
  .pv-cal-date b { font-size: 20px; }
  .pv-cal-body strong { font-size: 14px; }
  .pv-item { padding: 12px; }
  .pv-item-actions { width: 100%; }
  .pv-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pv-tools a { padding: 14px; border-radius: 14px; }
  .pv-tools a:last-child { grid-column: 1 / -1; }
  .pv-tools span { font-size: 12px; }
  /* compact top bar on this page */
  body[data-page="portal"] .topbar { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  body[data-page="portal"] .topbar .brand { min-width: 0; flex: 1 1 auto; }
  body[data-page="portal"] .topbar .nav-links { display: flex; width: auto; flex: none; gap: 6px; padding: 0; margin-left: auto; }
  body[data-page="portal"] .topbar .nav-links a, body[data-page="portal"] .topbar .nav-links button { width: auto; min-height: 34px; padding: 6px 10px; font-size: 13px; }
  body[data-page="portal"] .topbar .auth-nav-item { display: block; }
}

/* Saved portfolio tracking (21 Nov 2026) */
.pv-track { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--teal-dark, #0b3d39); }
.pv-spark { flex: none; color: var(--teal-dark, #0b3d39); }
.pv-up { color: #15803d; }
.pv-down { color: #b45309; }

/* Notices (21 Nov 2026) */
.pv-notices { display: grid; gap: 10px; margin: 0 0 16px; }
.pv-notices[hidden] { display: none; }
.pv-notice { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px;
  padding: 12px 16px; border: 1px solid #f2c48d; border-left: 4px solid #b45309; border-radius: 10px; background: #fff8ef; }
.pv-notice-text { display: grid; gap: 3px; min-width: 0; flex: 1 1 320px; }
.pv-notice-text strong { color: #7c2d12; }
