/* "My Professional OS" dashboard (/pro) and the pro section tab bar (25 Nov 2026). Mobile first; app.css tokens only, so light and dark themes both work. */

/* Tab bar: one row that scrolls sideways on phones */
.ph-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scroll-snap-type: x proximity; }
.ph-tabs a { flex: none; white-space: nowrap; scroll-snap-align: start; }
.ph-tabs .pr-promise { margin-left: auto; padding-left: 16px; }

.ph { max-width: 1180px; }
.ph h2 { font-size: var(--step-1, 1.15rem); margin: 0; }
.ph h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0; }
.ph-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 16px; }
.ph-card + .ph-card { margin-top: 14px; }
.ph-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ph-card-h a { white-space: nowrap; }
.ph .hint { color: var(--ink-soft); }
.ph-empty, .ph-lockp { color: var(--ink-soft); margin: 6px 0 10px; font-size: .95rem; }
.ph-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

/* Header */
.ph-head { display: grid; gap: 14px; margin: 6px 0 16px; }
.ph-kicker { font: 700 .74rem/1.2 var(--font-body, inherit); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.ph-hello h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 0 0 6px; letter-spacing: -.02em; }
.ph-plan { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .95rem; }
.ph-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; background: var(--rule); color: var(--ink); }
.ph-badge-pro { background: var(--accent-tint); color: var(--accent); }
.ph-badge-practice { background: var(--review-tint); color: var(--review); }
.ph-badge-firm { background: var(--brand-navy, #0B1F3A); color: #fff; }
.ph-complete { padding: 14px 16px; }
.ph-complete-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ph-complete h2 { font-size: 1rem; }
.ph-meter { height: 8px; border-radius: 999px; background: var(--rule); overflow: hidden; margin: 8px 0 10px; }
.ph-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-teal, #0E9F9A), var(--pass, #0E7C5A)); }
.ph-meter-s { height: 6px; margin: 6px 0 12px; }
.ph-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ph-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.ph-checks li.ok { color: var(--ink-soft); }
.ph-checks .ph-tick { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; border: 1.5px solid var(--rule-strong); color: var(--ink-soft); }
.ph-checks li.ok .ph-tick { background: var(--pass-tint); border-color: var(--pass); color: var(--pass); }
.ph-checks a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.ph-checks a b { color: var(--accent); }
.ph-checks a .hint { font-size: .82rem; }

/* KPI row */
.ph-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ph-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; text-decoration: none; color: var(--ink); min-height: 96px; transition: border-color .15s, transform .15s; }
.ph-kpi:hover { border-color: var(--accent); transform: translateY(-1px); }
.ph-kpi-l { font-size: .76rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.ph-kpi b { font: 800 1.45rem/1.15 var(--font-display, inherit); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ph-kpi b small { font-size: .75rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.ph-kpi-s { font-size: .8rem; color: var(--ink-soft); margin-top: auto; }
.ph-kpi.due { border-left: 4px solid var(--highlight, #F5A524); }
.ph-kpi.warn { border-left: 4px solid var(--error, #B42318); }
.ph-kpi.warn .ph-kpi-s { color: var(--error); font-weight: 600; }
.ph-kpi-locked { grid-column: 1 / -1; background: repeating-linear-gradient(135deg, var(--sheet), var(--sheet) 10px, var(--paper) 10px, var(--paper) 20px); border-style: dashed; }
.ph-kpi-locked .ph-kpi-lockb { font-size: 1.05rem; }
.ph-kpi-locked .ph-kpi-s { color: var(--review); font-weight: 700; }

/* Quick actions: a scrolling chip row on phones, wrapping on wider screens */
.ph-actions { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 8px; scrollbar-width: thin; }
.ph-actions a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; min-height: 44px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.ph-actions a:hover { border-color: var(--accent); color: var(--accent); }

/* Two columns from tablets up */
.ph-cols { display: grid; gap: 14px; }
.ph-col { min-width: 0; }

/* Lists (today, content, proposals) */
.ph-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 12px 0 6px; }
.ph-sub:first-of-type { margin-top: 2px; }
.ph-list { list-style: none; margin: 0; padding: 0; }
.ph-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: .94rem; min-height: 44px; }
.ph-list li:first-child { border-top: 0; }
.ph-list li > a:not(.ph-wa):not(.ph-tickbox) { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-list li > a:hover { color: var(--accent); }
.ph-list li .hint { flex: none; font-size: .8rem; }
.ph-list li.late .hint { color: var(--error); font-weight: 600; }
.ph-list li.done > a { text-decoration: line-through; color: var(--ink-soft); }
.ph-tickbox { flex: none; width: 22px; height: 22px; border: 2px solid var(--rule-strong); border-radius: 6px; }
.ph-tickbox:hover { border-color: var(--pass); background: var(--pass-tint); }
.ph-pri { font-size: .7rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--error-tint); color: var(--error); }
.ph-wa { flex: none; font-size: .8rem; font-weight: 700; color: var(--pass); text-decoration: none; padding: 4px 8px; border: 1px solid var(--pass); border-radius: 999px; }
.ph-day { flex: none; width: 34px; font-size: .74rem; font-weight: 800; text-transform: uppercase; color: var(--accent); }
.ph-week { font-size: .94rem; }
.ph-last { margin: 12px 0 0; font-size: .85rem; }

/* Pipeline bars */
.ph-bars { display: grid; gap: 8px; }
.ph-bar { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 32px; }
.ph-bar-l { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-bar-t { height: 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.ph-bar-t span { display: block; height: 100%; border-radius: inherit; background: var(--brand-teal, #0E9F9A); }
.ph-bar-n { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 2ch; }
.ph-bar-n small { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
a.ph-bar:hover .ph-bar-l { color: var(--accent); }
.ph-st-converted .ph-bar-t span, .ph-st-client .ph-bar-t span { background: var(--pass, #0E7C5A); }
.ph-st-lost .ph-bar-t span, .ph-st-closed .ph-bar-t span { background: var(--rule-strong); }
.ph-st-proposal .ph-bar-t span, .ph-st-meeting .ph-bar-t span { background: var(--highlight, #F5A524); }
.ph-bars-ghost { opacity: .45; filter: grayscale(1); pointer-events: none; }

/* Locked preview */
.ph-unlock { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; min-height: 44px; border-radius: 999px; background: var(--review-tint); color: var(--review); font-weight: 700; text-decoration: none; font-size: .9rem; }
.ph-unlock:hover { filter: brightness(.97); text-decoration: underline; }

/* Renewals strip */
.ph-renew { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ph-renew li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.ph-kind { flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .05em; padding: 3px 6px; border-radius: 6px; background: var(--accent-tint); color: var(--accent); min-width: 44px; text-align: center; }
.ph-rl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-rl b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-rl .hint { font-size: .8rem; }
.ph-rd { flex: none; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.ph-renew li.near .ph-rd { color: var(--review); }
.ph-renew li.soon { border-color: var(--highlight); background: var(--review-tint); }
.ph-renew li.soon .ph-rd { color: var(--review); }
.ph-renew li.lapsed { border-color: var(--error); background: var(--error-tint); }
.ph-renew li.lapsed .ph-rd { color: var(--error); }
.ph-learn { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: .9rem; }
.ph-learn a { color: var(--ink); text-decoration: none; }
.ph-learn a:hover { color: var(--accent); }

.ph-note { margin-top: 16px; }
.ph-h2 { margin: 26px 0 0 !important; }
.ph-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ph-tools .pro-card { padding: 12px; gap: 4px; }
.ph-tools .pro-card .pro-ic { font-size: 1.4rem; }
.ph-tools .pro-card b { font-size: .95rem; }
.ph-foot { margin-top: 18px; max-width: 760px; }

@media (min-width: 640px) {
  .ph-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-kpi-locked { grid-column: span 1; }
  .ph-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-card { padding: 18px 20px; }
}
@media (min-width: 900px) {
  .ph-head { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .ph-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .ph-kpi-locked { grid-column: span 3; }
  .ph-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .ph-actions { flex-wrap: wrap; overflow: visible; }
  .ph-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) { .ph-tools { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Pro pages: let grid/flex children shrink so wide tables scroll inside their panel instead of widening the page */
.section [class*="grid"] > *, .section .layout-2 > *, .section .panel { min-width: 0; }
