/* ==========================================================================
   121 Pilot — design system
   Clarity over decoration. Brand violet for action, calm neutrals for work.
   Light by default, dark when the device prefers it.
   ========================================================================== */

:root {
	--ink: #0F0D16;
	--ink-2: #17151F;
	--bg: #FBFAFF;
	--surface: #FFFFFF;
	--surface-2: #F7F5FE;
	--line: #E3DFF1;
	--line-2: #D2CCE6;
	--text: #16141D;
	--text-2: #4A4656;
	--mute: #6E6979;
	--violet: #5B2EFF;
	--violet-ink: #4520D6;
	--violet-soft: #EEEAFF;
	--violet-hi: #A48CFF;
	--grad: linear-gradient(100deg, #5B2EFF 0%, #8A3FE8 55%, #B65CE0 100%);
	--ok: #0F8A5F; --ok-soft: #E3F5EC;
	--warn: #9A5B00; --warn-soft: #FFF1D6;
	--danger: #C0213A; --danger-soft: #FDE7EA;
	--info: #2458C6; --info-soft: #E6EEFD;
	--muted-soft: #F1EEFB;
	--shadow-1: none;
	--shadow-2: 0 10px 30px -10px rgba(20, 16, 40, .25), 0 2px 6px rgba(20, 16, 40, .06);
	--r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
	--f-display: "Archivo", system-ui, sans-serif;
	--f-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--side: 236px;
	--ease: cubic-bezier(.2, .7, .1, 1);
	color-scheme: light;
}

/* Dark theme: chosen per person (Light / Dark / Auto by time of day).
   The attribute is set before first paint by the script in _head.php. */
:root[data-theme="dark"] {
		--bg: #0C0B12;
		--surface: #15131D;
		--surface-2: #1A1824;
		--line: #262333;
		--line-2: #353146;
		--text: #F1EEF8;
		--text-2: #C9C4D6;
		--mute: #938DA3;
		--violet: #7A57FF;
		--violet-ink: #A48CFF;
		--violet-soft: #221C3F;
		--ok: #45D69C; --ok-soft: #112A21;
		--warn: #F2B24C; --warn-soft: #2E2210;
		--danger: #FF7A8C; --danger-soft: #331419;
		--info: #8AB0FF; --info-soft: #152035;
		--muted-soft: #211F2B;
		--shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
		--shadow-2: 0 18px 40px -12px rgba(0, 0, 0, .7);
		color-scheme: dark;
}
:root.p-theme-anim, :root.p-theme-anim * { transition: background-color .35s ease, border-color .35s ease, color .35s ease !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--violet-hi); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p-skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
.p-skip:focus { top: 12px; }
.p-noscroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.p-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.p-mark { width: 40px; height: auto; }
.p-small { font-size: 13px; }
.p-muted { color: var(--mute); }
.p-strong { font-weight: 600; }
.p-danger { color: var(--danger); }
.p-ok { color: var(--ok); }
.p-mt { margin-top: 12px; }

/* ---------- Boot ---------- */
.p-boot { min-height: 100vh; display: grid; place-items: center; }
.p-boot .p-mark { width: 64px; animation: p-breathe 1.4s var(--ease) infinite alternate; }
@keyframes p-breathe { from { opacity: .35; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ---------- Buttons ---------- */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.p-btn:hover { border-color: var(--text-2); }
.p-btn:active { transform: translateY(1px); }
.p-btn[disabled] { opacity: .6; cursor: default; }
.p-btn-primary { background: var(--violet); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(91, 46, 255, .8); }
.p-btn-primary:hover { background: var(--violet-ink); border-color: transparent; }
:root[data-theme="dark"] .p-btn-primary:hover { background: #6A45FF; }
.p-btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.p-btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.p-btn-ghost:hover { background: var(--muted-soft); border-color: transparent; }
.p-btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.p-btn-sm .p-i { width: 16px; height: 16px; }
.p-btn-block { width: 100%; min-height: 48px; font-size: 15px; }
.p-btn.is-busy { position: relative; color: transparent !important; }
.p-btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--mute) transparent var(--mute) transparent; animation: p-spin .7s linear infinite; }
.p-btn-primary.is-busy::after { border-color: #fff transparent #fff transparent; }
.p-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.p-iconbtn:hover { background: var(--muted-soft); color: var(--text); }
.p-iconbtn-sm { width: 30px; height: 30px; }
.p-iconbtn-sm .p-i { width: 15px; height: 15px; }
.p-link { display: inline-flex; align-items: center; gap: 4px; color: var(--violet-ink); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
.p-link:hover { text-decoration: underline; }
.p-link .p-i { width: 15px; height: 15px; }

/* ---------- Badges & tags ---------- */
.p-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.p-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-badge-ok { background: var(--ok-soft); color: var(--ok); }
.p-badge-warn { background: var(--warn-soft); color: var(--warn); }
.p-badge-danger { background: var(--danger-soft); color: var(--danger); }
.p-badge-info { background: var(--info-soft); color: var(--info); }
.p-badge-progress { background: var(--violet-soft); color: var(--violet-ink); }
.p-badge-muted { background: var(--muted-soft); color: var(--mute); }
.p-tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); background: var(--muted-soft); color: var(--text-2); font-size: 11.5px; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.p-tag-ok { background: var(--ok-soft); color: var(--ok); }
.p-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 8px; border-radius: var(--r-pill); background: var(--muted-soft); color: var(--text-2); font: 700 12px/1 var(--f-text); vertical-align: 2px; }

/* ---------- Staff layout ---------- */
.p-layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.p-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 18px 12px; background: var(--ink); color: #D9D4E6; }
.p-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; text-decoration: none; color: #fff; font: 800 19px/1 var(--f-display); font-variation-settings: "wdth" 112; letter-spacing: -.01em; }
.p-brand .p-mark { width: 42px; }
.p-nav { display: flex; flex-direction: column; gap: 2px; }
.p-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #BDB7CC; text-decoration: none; font-weight: 500; }
.p-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.p-nav-link.is-active { background: rgba(122, 87, 255, .22); color: #fff; box-shadow: inset 3px 0 0 #A48CFF; }
.p-side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; }
.p-mainwrap { min-width: 0; display: flex; flex-direction: column; }
.p-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.p-brand-mobile { display: none; padding: 0; }
.p-searchbtn { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--mute); cursor: pointer; text-align: left; }
.p-searchbtn:hover { border-color: var(--line-2); }
.p-searchbtn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-searchbtn kbd { font: 600 11px/1 var(--f-text); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.p-search-mobile { display: none; }
.p-dd { position: relative; }
.p-newbtn { margin-left: auto; }
.p-userbtn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.p-avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; background: var(--violet-soft); color: var(--violet-ink); font-weight: 700; font-size: 13px; }
.p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-avatar-org { border-radius: 10px; background: var(--ink); color: #fff; }
:root[data-theme="dark"] .p-avatar-org { background: var(--violet-soft); color: var(--violet-ink); }
.p-menu { position: absolute; top: calc(100% + 8px); min-width: 230px; z-index: 60; padding: 6px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.p-menu-right { right: 0; }
.p-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.p-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); text-decoration: none; text-align: left; font-size: 14px; cursor: pointer; }
.p-menu-item:hover, .p-menu-item:focus-visible { background: var(--muted-soft); outline: none; }
.p-main { width: 100%; max-width: 1360px; padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 32px) 64px; outline: none; }
.p-tabbar { display: none; }

/* ---------- Page structure ---------- */
.p-pagehead { margin-bottom: 20px; }
.p-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--mute); text-decoration: none; font-size: 14px; font-weight: 500; }
.p-back:hover { color: var(--text); }
.p-back .p-i { width: 16px; height: 16px; }
.p-pagehead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.p-pagehead h1 { font: 800 clamp(26px, 3.2vw, 34px)/1.1 var(--f-display); font-variation-settings: "wdth" 108; letter-spacing: -.02em; }
.p-eyebrow { margin-bottom: 6px; color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.p-sub { margin-top: 6px; color: var(--text-2); }
.p-pagehead-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-section-title { margin: 26px 0 12px; font: 700 16px/1.2 var(--f-text); }

.p-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.p-card + .p-card, .p-stats + .p-card, .p-card + .p-stats, .p-card + .p-grid-3, .p-stats + .p-grid-3, .p-pipe + .p-two, .p-card + .p-two, .p-stats + .p-two { margin-top: 18px; }
.p-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.p-card-head h2 { font: 700 15px/1.3 var(--f-text); }
.p-card-actions { display: flex; gap: 6px; }
.p-card-body { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.p-card-body > .p-btn { align-self: flex-start; }
.p-stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.p-stack-sm { display: flex; flex-direction: column; gap: 10px; }
.p-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.p-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.p-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.p-input, .p-select-inline { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-width: 0; }
.p-toolbar .p-input[type=search] { flex: 1; max-width: 360px; }
.p-select-inline { padding-right: 30px; font-weight: 500; }

/* Key/value */
.p-kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin: 0; }
.p-kv dt { color: var(--mute); font-size: 13px; }
.p-kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.p-kv a { color: var(--violet-ink); }

/* Stats */
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 18px; }
.p-stat { display: block; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
a.p-stat:hover { border-color: var(--violet-hi); transform: translateY(-1px); }
.p-stat-label { color: var(--mute); font-size: 13px; font-weight: 500; }
.p-stat-value { margin-top: 4px; font: 800 28px/1.1 var(--f-display); font-variation-settings: "wdth" 104; letter-spacing: -.01em; }
.p-stat-hint { margin-top: 4px; color: var(--mute); font-size: 12.5px; }
.p-stats-sm .p-stat { padding: 12px 16px; }
.p-stats-sm .p-stat-value { font-size: 22px; }

/* Attention */
.p-card-attn { border-color: color-mix(in srgb, var(--violet) 30%, var(--line)); }
.p-attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.p-attn-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.p-attn-item:first-child { border-top: 0; padding-top: 2px; }
.p-attn-sev { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.is-high .p-attn-sev { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.is-medium .p-attn-sev { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.is-low .p-attn-sev { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.p-attn-text { flex: 1; min-width: 0; }
.p-attn-title { font-weight: 600; }
.p-attn-detail { color: var(--mute); font-size: 13px; }

/* Lists */
.p-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.p-list-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; margin: 0 -6px; border-radius: 10px; text-decoration: none; }
a.p-list-row:hover { background: var(--surface-2); }
.p-list-main { flex: 1; min-width: 0; }
.p-list-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-list-sub { color: var(--mute); font-size: 13px; }
.p-datechip { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 10px; background: var(--violet-soft); color: var(--violet-ink); line-height: 1; }
.p-datechip b { font: 800 18px/1 var(--f-display); }
.p-datechip span { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.p-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.p-bars a { display: grid; grid-template-columns: 120px 1fr 28px; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; }
.p-bars-track { height: 10px; border-radius: 6px; background: var(--muted-soft); overflow: hidden; }
.p-bars-track span { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.p-bars-n { text-align: right; font-weight: 700; }
.p-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.p-feed-row { display: block; padding: 8px 6px; margin: 0 -6px; border-radius: 10px; text-decoration: none; font-size: 14px; }
a.p-feed-row:hover { background: var(--surface-2); }

/* Rows (client list, team) */
.p-rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.p-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); text-decoration: none; }
.p-row:first-child { border-top: 0; }
a.p-row:hover { background: var(--surface-2); }
.p-row-main { flex: 1; min-width: 0; }
.p-row-title { font-weight: 600; }
.p-row-sub { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-row-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; color: var(--mute); }
.p-row-chev { color: var(--mute); }
.p-row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--muted-soft); }

/* Segmented control */
.p-seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--muted-soft); }
.p-seg-btn { border: 0; background: none; padding: 7px 14px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.p-seg-btn.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------- Lead board ---------- */
.p-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.p-col { display: flex; flex-direction: column; min-height: 200px; background: var(--muted-soft); border-radius: var(--r-md); padding: 10px; scroll-snap-align: start; transition: box-shadow .15s, background .15s; }
.p-col.is-over { background: var(--violet-soft); box-shadow: inset 0 0 0 2px var(--violet-hi); }
.p-col-head { display: flex; align-items: center; gap: 4px; padding: 4px 4px 10px; }
.p-col-head h2 { font: 700 13px/1.2 var(--f-text); }
.p-col-head .p-count { background: var(--surface); }
.p-col-sum { margin-left: auto; color: var(--mute); font-size: 12px; font-weight: 600; }
.p-col-body { display: flex; flex-direction: column; gap: 8px; }
.p-col-empty { color: var(--mute); text-align: center; padding: 16px 0; }
.p-leadcard { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; cursor: grab; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s, transform .15s; }
.p-leadcard:hover { border-color: var(--violet-hi); box-shadow: var(--shadow-2); }
.p-leadcard.is-drag { opacity: .5; transform: rotate(1deg); }
.p-leadcard-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.p-leadcard-title { font-weight: 700; line-height: 1.3; }
.p-leadcard-sub { color: var(--text-2); font-size: 13px; }
.p-leadcard-meta { margin-top: 4px; color: var(--mute); font-size: 13px; }
.p-leadcard-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--text-2); font-size: 12.5px; }
.p-leadcard-due { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--danger); font-size: 12.5px; font-weight: 600; }
.p-leadcard-due .p-i { width: 14px; height: 14px; }

.p-pipe { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; }
.p-pipe-step { flex: 1 0 auto; padding: 8px 12px; border-radius: 8px; background: var(--muted-soft); color: var(--mute); font-size: 12.5px; font-weight: 600; text-align: center; white-space: nowrap; }
.p-pipe-step.is-done { background: var(--violet-soft); color: var(--violet-ink); }
.p-pipe-step.is-current { background: var(--violet); color: #fff; }
.p-pipe-step.is-lost { background: var(--danger-soft); color: var(--danger); }
.p-qual { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-score { font-weight: 700; font-size: 13px; color: var(--text-2); }
.p-summary { white-space: pre-line; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.p-reasons { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }

/* ---------- Projects ---------- */
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-projcard { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s, box-shadow .15s; }
.p-projcard:hover { border-color: var(--violet-hi); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.p-projcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-projcard-title { font: 700 17px/1.25 var(--f-text); }
.p-projcard-stage { margin-top: 6px; font-weight: 600; font-size: 14px; }
.p-projcard-foot { display: flex; justify-content: space-between; color: var(--mute); font-size: 13px; margin-top: 4px; }
.p-projrow { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.p-projrow:hover { border-color: var(--violet-hi); }
.p-projrow-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.p-projrow-title { font-weight: 700; }
.p-projrow-sub { color: var(--mute); font-size: 13px; }
.p-bar { height: 6px; border-radius: 4px; background: var(--muted-soft); overflow: hidden; }
.p-bar span { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s var(--ease); }
.p-details summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; padding: 6px 0; }
.p-details[open] summary { margin-bottom: 8px; }
.p-details .p-projrow + .p-projrow { margin-top: 8px; }

/* Stage tracker */
.p-card-track .p-card-body { padding-top: 20px; }
.p-track { display: flex; list-style: none; margin: 0; padding: 0; counter-reset: s; overflow-x: auto; }
.p-step { position: relative; flex: 1 0 96px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 4px 4px; }
.p-step::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--line-2); }
.p-step:first-child::before { display: none; }
.p-step.is-done::before, .p-step.is-current::before { background: var(--violet); }
.p-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); color: #fff; }
.p-dot .p-i { width: 15px; height: 15px; stroke-width: 2.6; }
.is-done .p-dot { background: var(--violet); border-color: var(--violet); }
.is-current .p-dot { border-color: var(--violet); box-shadow: 0 0 0 5px var(--violet-soft); }
.p-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); animation: p-pulse 1.6s ease-in-out infinite; }
@keyframes p-pulse { 50% { transform: scale(.65); opacity: .6; } }
.p-step-label { font-size: 12.5px; font-weight: 600; color: var(--mute); line-height: 1.25; }
.is-done .p-step-label { color: var(--text-2); }
.is-current .p-step-label { color: var(--text); font-weight: 700; }
.p-step[role=button] { cursor: pointer; border-radius: 10px; }
.p-step[role=button]:hover .p-step-label { color: var(--violet-ink); }
.p-track-foot { display: flex; justify-content: space-between; align-items: center; color: var(--mute); font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.p-track-v { flex-direction: column; gap: 0; overflow: visible; }
.p-track-v .p-step { flex: none; flex-direction: row; align-items: center; text-align: left; gap: 14px; padding: 0 0 22px; }
.p-track-v .p-step::before { top: auto; bottom: 100%; left: 13px; right: auto; width: 2px; height: 22px; }
.p-track-v .p-step:last-child { padding-bottom: 0; }
.p-track-v .p-step-label { font-size: 15px; }

/* Actions (requests & to-dos) */
.p-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.p-action { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.p-action:first-child { border-top: 0; padding-top: 0; }
.p-action input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--violet); flex: none; }
.p-action-title { font-weight: 600; }
.p-action-meta { color: var(--mute); font-size: 13px; }
.p-action.is-done .p-action-title { text-decoration: line-through; color: var(--mute); font-weight: 500; }
.p-action.is-overdue .p-action-meta { color: var(--danger); }

/* Notes */
.p-private { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12.5px; }
.p-private .p-i { width: 15px; height: 15px; }
.p-composer { display: flex; flex-direction: column; gap: 8px; }
.p-composer textarea { width: 100%; resize: vertical; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.p-composer-row { display: flex; gap: 8px; justify-content: flex-end; }
.p-composer-row select { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 0 8px; }
.p-notes { display: flex; flex-direction: column; gap: 10px; }
.p-note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.p-note.is-pinned { border-color: var(--violet-hi); background: var(--violet-soft); }
.p-note-meta { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 12.5px; }
.p-note-kind { font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.p-note-tools { margin-left: auto; display: flex; opacity: .55; }
.p-note:hover .p-note-tools, .p-note-tools:focus-within { opacity: 1; }
.p-note-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Contacts */
.p-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.p-contact { display: flex; gap: 12px; }
.p-contact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.p-contact-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.p-contactlinks { display: flex; gap: 6px; flex-wrap: wrap; }

/* Timeline */
.p-timeline { list-style: none; margin: 0; padding: 0; }
.p-timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.p-timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.p-timeline li:last-child::before { display: none; }
.p-tl-dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--violet); background: var(--surface); flex: none; }
.p-tl-text { font-size: 14px; }
.p-tl-meta { color: var(--mute); font-size: 12.5px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.p-tl-vis { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--violet-ink); font-weight: 600; }
.p-tl-vis .p-i { width: 13px; height: 13px; }

/* Settings */
.p-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.p-checks li { display: flex; gap: 8px; align-items: center; }
.p-checks .is-pass .p-i { color: var(--ok); }
.p-checks .is-fail { color: var(--danger); font-weight: 600; }
.p-wf { display: flex; flex-direction: column; gap: 12px; }
.p-wf-row .p-small { color: var(--text-2); }

/* ---------- Forms ---------- */
.p-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.p-span2 { grid-column: 1 / -1; }
.p-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.p-field label, .p-field legend, .p-field > span { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; }
.p-field input, .p-field select, .p-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 15px; }
.p-field textarea { resize: vertical; }
.p-field input:focus, .p-field select:focus, .p-field textarea:focus, .p-input:focus, .p-composer textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.p-req { color: var(--danger); }
.p-help { color: var(--mute); font-size: 12.5px; }
.p-form-error { color: var(--danger); font-size: 14px; font-weight: 600; margin-top: 10px; }
.p-form-error:empty { display: none; }
.p-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.p-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.p-check input { width: 18px; height: 18px; accent-color: var(--violet); }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.p-chip { position: relative; }
.p-chip input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.p-chip span { display: inline-block; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.p-chip input:checked + span { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-ink); font-weight: 600; }
.p-chip input:focus-visible + span { outline: 3px solid var(--violet-hi); outline-offset: 2px; }

/* ---------- Overlay / modal / toast ---------- */
.p-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: 8vh 16px 16px; background: rgba(12, 10, 20, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .16s; overflow-y: auto; }
.p-overlay.is-on { opacity: 1; }
.p-modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); transform: translateY(8px) scale(.98); transition: transform .2s var(--ease); outline: none; }
.p-overlay.is-on .p-modal { transform: none; }
.p-modal-wide { max-width: 720px; }
.p-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 22px; }
.p-modal-head h2 { font: 700 18px/1.3 var(--f-text); }
.p-modal-body { padding: 12px 22px 22px; }
.p-modal-body > div > p.p-muted { margin-bottom: 14px; }
.p-toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.p-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.p-toast.is-error { background: var(--danger); }
.p-loading { display: flex; align-items: center; gap: 10px; color: var(--mute); padding: 40px 0; }
.p-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--violet); animation: p-spin .7s linear infinite; }
@keyframes p-spin { to { transform: rotate(360deg); } }
.p-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--text-2); }
.p-empty h3 { font: 700 16px/1.3 var(--f-text); color: var(--text); }
.p-empty p { max-width: 420px; font-size: 14px; }
.p-empty .p-btn { margin-top: 8px; }
.p-empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); }

/* Search */
.p-search-input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 17px; background: var(--surface-2); }
.p-search-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.p-search-results { margin-top: 14px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.p-search-group { display: flex; flex-direction: column; gap: 2px; }
.p-search-hit { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t b" "s b"; gap: 0 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; }
.p-search-hit:hover, .p-search-hit.is-active { background: var(--violet-soft); }
.p-search-title { grid-area: t; font-weight: 600; }
.p-search-sub { grid-area: s; color: var(--mute); font-size: 13px; }
.p-search-hit .p-badge { grid-area: b; align-self: center; }

/* ---------- Sign-in ---------- */
.p-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 80% -10%, rgba(122, 87, 255, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(182, 92, 224, .25), transparent 60%), var(--ink); color: var(--text); }
.p-auth-card { width: 100%; max-width: 420px; padding: 32px 28px; border-radius: 22px; background: var(--surface); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.p-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; text-decoration: none; font: 800 18px/1 var(--f-display); font-variation-settings: "wdth" 112; }
.p-auth-card h1 { font: 800 28px/1.1 var(--f-display); font-variation-settings: "wdth" 108; letter-spacing: -.02em; }
.p-auth-card > .p-muted { margin: 8px 0 20px; }
.p-auth .p-form { display: flex; flex-direction: column; gap: 14px; }
.p-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.p-auth-row a, .p-auth-foot a { color: var(--violet-ink); font-weight: 600; }
.p-auth-foot { margin-top: 22px; color: var(--mute); font-size: 13.5px; text-align: center; }
.p-alert { padding: 12px 14px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.p-alert-error { background: var(--danger-soft); color: var(--danger); }

/* ==========================================================================
   Client portal
   ========================================================================== */
.p-client { background: var(--bg); }
.c-layout { min-height: 100vh; display: flex; flex-direction: column; }
.c-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 4vw, 40px); background: var(--ink); color: #fff; }
.c-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 16px/1 var(--f-display); font-variation-settings: "wdth" 110; }
.c-brand .p-mark { width: 38px; }
.c-top-right { display: flex; align-items: center; gap: 8px; }
.c-user { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.c-user .p-avatar { width: 32px; height: 32px; }
.c-top .p-btn-ghost { color: #D9D4E6; }
.c-top .p-btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.c-main { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 56px; outline: none; flex: 1; }
.c-hero { padding: clamp(28px, 5vw, 48px) 0 22px; }
.c-hero h1 { font: 800 clamp(30px, 5vw, 46px)/1.05 var(--f-display); font-variation-settings: "wdth" 110; letter-spacing: -.025em; }
.c-eyebrow { color: var(--violet-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 8px; }
.c-lede { margin-top: 10px; font-size: 17px; color: var(--text-2); }
.c-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; color: var(--mute); font-size: 14px; }
.c-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow-1); min-width: 0; }
.c-card h2 { display: flex; align-items: center; gap: 8px; font: 700 17px/1.3 var(--f-text); margin-bottom: 14px; }
.c-card + .c-card, .c-card + .c-section, .c-projects + .c-cols, .c-card + .c-cols, .c-cols + .c-card, .c-hero + .c-cols { margin-top: 20px; }
.c-attn { border: 0; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.c-attn h2 { color: var(--violet-ink); }
.c-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.c-action { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.c-action-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--violet-soft); color: var(--violet-ink); flex: none; }
.c-action-text { flex: 1; min-width: 0; }
.c-action-title { font-weight: 700; font-size: 16px; }
.c-action-detail { color: var(--text-2); font-size: 14px; margin-top: 2px; white-space: pre-line; }
.c-action-due { color: var(--mute); font-size: 13px; margin-top: 2px; }
.c-action.is-overdue .c-action-due { color: var(--danger); font-weight: 600; }
.c-action-btn .p-btn { min-height: 44px; }
.c-section { margin: 28px 0 12px; font: 700 20px/1.2 var(--f-text); }
.c-projects { display: grid; gap: 16px; }
.c-project { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 3vw, 26px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s, transform .15s; }
.c-project:hover { border-color: var(--violet-hi); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.c-project-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.c-project-top .c-eyebrow { margin: 0; }
.c-project h3 { font: 800 22px/1.2 var(--f-display); font-variation-settings: "wdth" 106; letter-spacing: -.01em; }
.c-status { color: var(--text-2); font-weight: 500; margin-bottom: 10px; }
.c-project-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--mute); font-size: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.c-project-open { display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; color: var(--violet-ink); font-weight: 700; font-size: 14px; }
.c-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.c-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.c-contact p { color: var(--text-2); }
.c-contact-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.c-pastlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.c-pastlist a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.c-pastlist a:hover { border-color: var(--violet-hi); }
.c-again { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--violet-soft); }
.c-strong { font-weight: 700; }
.c-progress-num { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; color: var(--mute); }
.c-progress-num b { font: 800 34px/1 var(--f-display); color: var(--text); }
.c-pre { white-space: pre-wrap; color: var(--text-2); }
.c-donelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.c-donelist li { display: flex; gap: 8px; align-items: center; }
.c-donelist .p-i { color: var(--ok); }
.c-foot { padding: 24px 16px 32px; text-align: center; color: var(--mute); font-size: 13px; }
.c-foot a { color: inherit; }
.c-main > .p-back { margin-top: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.p-grid-3 { grid-template-columns: 1fr 1fr; }
	.p-grid-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.p-layout { grid-template-columns: 1fr; }
	.p-side { display: none; }
	.p-brand-mobile { display: flex; }
	.p-brand-mobile .p-mark { width: 36px; }
	.p-searchbtn { display: none; }
	.p-search-mobile { display: inline-grid; margin-left: auto; }
	.p-newbtn { margin-left: 0; }
	.p-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
	.p-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -12px rgba(0, 0, 0, .25); }
	.p-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; color: var(--mute); text-decoration: none; font-size: 11.5px; font-weight: 600; }
	.p-tab .p-i { width: 22px; height: 22px; }
	.p-tab.is-active { color: var(--violet-ink); background: var(--violet-soft); }
	.p-two, .c-cols { grid-template-columns: 1fr; }
	.p-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
	.p-board { grid-auto-columns: minmax(80vw, 1fr); }
}
@media (max-width: 640px) {
	body { font-size: 15px; }
	.p-grid-3 { grid-template-columns: 1fr; }
	.p-form-grid { grid-template-columns: 1fr; }
	.p-pagehead-row { align-items: flex-start; }
	.p-pagehead-actions { width: 100%; }
	.p-pagehead-actions .p-btn-primary { flex: 1; }
	.p-newbtn span { display: none; }
	.p-newbtn { width: 40px; padding: 0; }
	.p-stats { grid-template-columns: 1fr 1fr; }
	.p-stat-value { font-size: 24px; }
	.p-attn-item { flex-wrap: wrap; }
	.p-attn-item .p-btn { margin-left: 24px; }
	.p-row { padding: 12px 14px; }
	.p-row-meta .p-small { display: none; }
	.p-kv { grid-template-columns: 1fr; gap: 2px; }
	.p-kv dd { margin-bottom: 8px; }
	.p-bars a { grid-template-columns: 96px 1fr 24px; }
	.p-overlay { padding: 0; place-items: end stretch; }
	.p-modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto; }
	.p-form-actions .p-btn { flex: 1; min-height: 48px; }
	.p-card-head { padding: 14px 16px 0; }
	.p-card-body { padding: 12px 16px 16px; }
	.c-action { flex-wrap: wrap; }
	.c-action-btn { width: 100%; }
	.c-action-btn .p-btn { width: 100%; min-height: 48px; }
	.c-hide-sm, .c-user-name { display: none; }
	.c-project .p-track { margin: 0 -6px; }
	.c-contact-btns .p-btn { flex: 1; }
	.c-again .p-btn { width: 100%; }
}
.p-stack > .p-card + .p-card, .p-stack > .p-stack + .p-card, .c-stack > .c-card + .c-card { margin-top: 0; }
.p-dangerzone { display: flex; justify-content: flex-end; }
.p-dangerzone .p-btn { color: var(--danger); }
.c-preview { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 10px 16px; background: #FFE9A8; color: #3A2A00; font-size: 14px; }
.c-preview .p-i { width: 18px; height: 18px; }
.c-preview + .c-layout .c-top { top: 52px; }

/* ==========================================================================
   Agreements & signing
   ========================================================================== */
.p-docframe { max-height: 72vh; overflow-y: auto; padding: 4px 6px 4px 0; }
.p-doc { font: 15px/1.65 Georgia, "Times New Roman", serif; color: var(--text); }
.p-doc h1 { font: 800 24px/1.2 var(--f-display); font-variation-settings: "wdth" 104; margin: 0 0 14px; }
.p-doc h2 { font: 700 18px/1.3 var(--f-text); margin: 28px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.p-doc h3 { font: 700 15px/1.4 var(--f-text); margin: 18px 0 6px; }
.p-doc p { margin: 0 0 10px; }
.p-doc ol, .p-doc ul { padding-left: 22px; margin: 0 0 10px; }
.p-doc table.pd { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 16px; }
.p-doc table.pd th { width: 32%; text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); font: 700 13px/1.4 var(--f-text); color: var(--text-2); }
.p-doc table.pd td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.p-doc .ack { margin-top: 20px; }
.c-secure { display: inline-flex; align-items: center; gap: 6px; color: #C9C4D6; font-size: 13px; font-weight: 600; }
.c-secure .p-i { width: 16px; height: 16px; }
.s-doc { padding: clamp(20px, 4vw, 44px); }
.s-sigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.s-sig { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.s-sig-for { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.s-sig-mark { font: 26px/1.2 "Homemade Apple", "Brush Script MT", cursive; color: var(--violet-ink); border-bottom: 1px solid var(--text); padding-bottom: 4px; margin-bottom: 6px; overflow-wrap: anywhere; }
.s-sig-meta { font-size: 13px; color: var(--text-2); }
.s-fp { margin-top: 16px; font-size: 11.5px; color: var(--mute); word-break: break-all; }
.s-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.s-panel { border: 2px solid var(--violet); display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.s-panel h2 { margin: 0; }
.s-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.s-check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--violet); }
.s-sigbox { border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px; background: var(--surface-2); }
.s-sigbox-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.s-mode { display: flex; flex-direction: column; gap: 6px; }
.s-mode .p-link { align-self: flex-end; }
.s-typed { min-height: 90px; display: flex; align-items: center; padding: 8px 12px; font: 34px/1.2 "Homemade Apple", "Brush Script MT", cursive; color: #1b1464; background: #fff; border-radius: 10px; overflow-wrap: anywhere; }
.s-pad { width: 100%; height: 170px; background: #fff; border-radius: 10px; touch-action: none; cursor: crosshair; display: block; }
.s-fine { font-size: 12.5px; color: var(--mute); }
.s-decline { align-self: center; color: var(--mute); font-weight: 500; }
.s-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.s-done h2 { justify-content: center; margin: 0; }
.s-done-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.s-done-icon .p-i { width: 28px; height: 28px; stroke-width: 2.6; }
.s-verify { max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.s-codearea { display: flex; flex-direction: column; gap: 10px; }
.s-code { height: 60px; text-align: center; font: 700 28px/1 var(--f-text); letter-spacing: .4em; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.s-code:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.s-float { display: none; }
.c-agreements .c-pastlist .p-btn { pointer-events: none; }
.p-signpage .c-main { max-width: 900px; }
@media (max-width: 640px) {
	.s-sigrow { grid-template-columns: 1fr; }
	.s-float { display: inline-flex; position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; box-shadow: var(--shadow-2); }
	.s-typed { font-size: 28px; }
}

/* Theme picker */
.p-menu-label { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.p-menu-item[aria-checked="true"] { color: var(--violet-ink); font-weight: 700; }
.p-menu-item .p-menu-check { margin-left: auto; }
.c-theme { color: #D9D4E6; }
.c-theme:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.p-theme-seg { display: flex; gap: 4px; padding: 4px 6px 8px; }
.p-theme-seg button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.p-theme-seg button[aria-checked="true"] { border-color: var(--violet); color: var(--violet-ink); background: var(--violet-soft); }
.p-theme-seg .p-i { width: 18px; height: 18px; }
.p-theme-note { padding: 0 12px 8px; font-size: 12px; color: var(--mute); }

/* Sign in with Google */
.p-google { gap: 12px; background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 600; }
.p-google:hover { background: #f8f9fa; border-color: #c6c9ce; }
.p-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--mute); font-size: 13px; }
.p-or::before, .p-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ==========================================================================
   Social (staff) — .so-*
   ========================================================================== */
.so-subnav { display: flex; gap: 4px; margin: -4px 0 20px; padding: 4px; border-radius: 14px; background: var(--muted-soft); overflow-x: auto; scrollbar-width: none; }
.so-subnav::-webkit-scrollbar { display: none; }
.so-subnav-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 14px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.so-subnav-link .p-i { width: 17px; height: 17px; }
.so-subnav-link:hover { color: var(--text); }
.so-subnav-link.is-active { background: var(--surface); color: var(--violet-ink); box-shadow: var(--shadow-1); }

.so-plat { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; background: var(--pc, #888); color: #fff; font: 800 10.5px/1 var(--f-text); letter-spacing: -.01em; }
.so-plat.is-none { background: var(--muted-soft); color: var(--mute); }
.so-platlabel { display: inline-flex; align-items: center; gap: 6px; }

/* Rows */
.so-rows { display: flex; flex-direction: column; gap: 6px; }
.so-row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.so-row:hover { border-color: var(--violet-hi); box-shadow: var(--shadow-1); }
.so-thumb { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--muted-soft); color: var(--mute); }
.so-thumb img { width: 100%; height: 100%; object-fit: cover; }
.so-thumb .p-i { width: 20px; height: 20px; }
.so-row-main { flex: 1; min-width: 0; }
.so-row-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.so-row-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-row-sub { font-size: 13px; color: var(--mute); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.so-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--warn); }
.so-flag .p-i { width: 13px; height: 13px; }
.so-agenda-row { display: flex; align-items: center; gap: 8px; }
.so-check { display: grid; place-items: center; width: 34px; height: 44px; flex: 0 0 auto; cursor: pointer; }
.so-check input { width: 18px; height: 18px; accent-color: var(--violet); }
.so-move { height: 36px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font-size: 13px; flex: 0 0 auto; }

/* Overview */
.so-clientprog { display: flex; flex-direction: column; gap: 12px; }
.so-clientprog-row { display: flex; flex-direction: column; gap: 6px; text-decoration: none; padding: 6px; margin: -6px; border-radius: 10px; }
.so-clientprog-row:hover { background: var(--muted-soft); }
.so-clientprog-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.so-clientprog-top .p-muted { margin-left: auto; }

/* Calendar */
.so-cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.so-cal-nav { display: flex; align-items: center; gap: 6px; }
.so-cal-label { font: 800 20px/1.2 var(--f-display); margin-left: 8px; }
.so-cal-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.so-cal-filters .p-input { height: 36px; }
.so-cal-body { transition: opacity .15s; }
.so-cal-body.is-loading { opacity: .5; }
.so-cal-summary:not(:empty) { margin-bottom: 14px; }
.so-tznote { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.so-tznote .p-i { width: 15px; height: 15px; flex: 0 0 auto; }
.so-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); gap: 1px; }
.so-dow { padding: 8px 10px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.so-day { min-height: 128px; padding: 6px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: background .12s; }
.so-day.is-out { background: var(--bg); }
.so-day.is-out .so-day-num { color: var(--mute); }
.so-day.is-past:not(.is-out) { background: color-mix(in srgb, var(--surface) 80%, var(--muted-soft)); }
.so-day.is-over, .so-weekday.is-over { background: var(--violet-soft); box-shadow: inset 0 0 0 2px var(--violet); }
.so-day-head { display: flex; align-items: center; gap: 4px; }
.so-day-num { border: 0; background: none; padding: 2px 6px; border-radius: 7px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text); }
.so-day-num:hover { background: var(--muted-soft); }
.so-day.is-today .so-day-num { background: var(--violet); color: #fff; }
.so-day-count { display: none; }
.so-add { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; color: var(--mute); cursor: pointer; opacity: 0; transition: opacity .12s; }
.so-add .p-i { width: 16px; height: 16px; }
.so-day:hover .so-add, .so-weekday:hover .so-add, .so-add:focus-visible { opacity: 1; }
.so-add:hover { background: var(--violet-soft); color: var(--violet-ink); }
.so-day-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.so-chip { position: relative; display: flex; align-items: center; gap: 5px; padding: 4px 6px 4px 4px; border-radius: 7px; background: var(--muted-soft); color: var(--text); text-decoration: none; font-size: 12px; line-height: 1.25; min-width: 0; cursor: pointer; border-left: 3px solid transparent; }
.so-chip[draggable="true"] { cursor: grab; }
.so-chip:hover { background: var(--violet-soft); }
.so-chip.is-drag { opacity: .4; }
.so-chip .so-plat { min-width: 18px; height: 18px; font-size: 9.5px; border-radius: 5px; }
.so-chip-time { font-weight: 700; color: var(--text-2); flex: 0 0 auto; }
.so-chip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.so-chip-warn { color: var(--warn); display: inline-flex; flex: 0 0 auto; }
.so-chip-warn .p-i { width: 13px; height: 13px; }
.so-chip-dot { display: none; }
.so-chip.is-idea, .so-chip.is-draft, .so-chip.is-in_production { border-left-color: var(--line-2); }
.so-chip.is-internal_review, .so-chip.is-scheduled { border-left-color: var(--info); }
.so-chip.is-client_review { border-left-color: var(--warn); }
.so-chip.is-revision_requested, .so-chip.is-failed { border-left-color: var(--danger); }
.so-chip.is-approved, .so-chip.is-published { border-left-color: var(--ok); }
.so-chip.is-published { opacity: .75; }
.so-more { border: 0; background: none; text-align: left; padding: 2px 6px; font-size: 12px; font-weight: 700; color: var(--violet-ink); cursor: pointer; }
.so-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.so-weekday { min-height: 320px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: background .12s; }
.so-weekday.is-today { border-color: var(--violet); }
.so-weekday-head { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.so-weekday-head span { color: var(--mute); }
.so-weekday-items { display: flex; flex-direction: column; gap: 4px; }
.so-empty-day { color: var(--mute); font-size: 13px; padding: 4px; }
.so-agenda { display: flex; flex-direction: column; gap: 8px; }
.so-agenda-day { font: 700 13px/1.3 var(--f-text); text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin-top: 10px; }
.so-agenda-day.is-today { color: var(--violet-ink); }
.so-bulk { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-2); margin-bottom: 8px; }
.so-bulk .p-dd { margin-left: auto; }
.so-bulk[hidden] { display: none; }

/* Deliverables */
.so-delivs { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.so-deliv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; margin-top: 8px; }
.so-deliv { display: flex; flex-direction: column; gap: 6px; }
.so-deliv-top { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.so-deliv-top b { font: 800 16px/1 var(--f-display); }
.so-deliv-top .p-muted { margin-left: auto; }
.so-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.so-month-prog { display: flex; flex-direction: column; gap: 10px; }
.so-month-name b { font: 800 16px/1 var(--f-display); }

/* Content views */
.so-views { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.so-view { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.so-view a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.so-view .p-i { width: 13px; height: 13px; color: var(--warn); }
.so-view button { border: 0; background: none; color: var(--mute); cursor: pointer; font-size: 15px; padding: 0 0 0 2px; }
.so-view.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.so-active-filters { display: flex; gap: 6px; align-items: center; margin: -6px 0 12px; }
.so-active-filters .p-tag { margin: 0; }

/* Ideas */
.so-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.so-idea { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.so-idea h3 { font: 700 16px/1.3 var(--f-text); }
.so-idea h3 a { text-decoration: none; }
.so-idea-notes { font-size: 14px; color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.so-idea-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }

/* Clients */
.so-clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.so-client { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .15s, transform .15s, box-shadow .15s; }
.so-client:hover { border-color: var(--violet-hi); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.so-client-top { display: flex; align-items: center; gap: 12px; }
.so-client-name { font: 800 17px/1.2 var(--f-display); }
.so-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.so-acctpills { display: flex; flex-wrap: wrap; gap: 6px; }
.so-acctpill { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border-radius: 8px; }
.so-acctpill.is-danger, .so-acctpill.is-warn { background: var(--danger-soft); color: var(--danger); padding-right: 5px; }
.so-acctpill .p-i { width: 13px; height: 13px; }
.so-brain .p-kv { margin-top: 4px; }
.so-brain-group + .so-brain-group { margin-top: 14px; }
.so-brain dd { white-space: pre-line; }
.so-never { color: var(--danger); }
.so-pillars { display: flex; flex-wrap: wrap; gap: 6px; }
.so-pillars .p-tag { margin: 0; font-size: 13px; padding: 4px 10px; text-decoration: none; }
.so-approver { padding: 4px 0; }
.so-accounts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.so-account { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.so-account:first-child { border-top: 0; }
.so-account-main { flex: 1; min-width: 0; }
.so-account-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.so-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.so-overview { margin-top: 18px; }
.so-rows { container-type: inline-size; }
@container (max-width: 440px) {
	.so-row { flex-wrap: wrap; }
	.so-row-main { flex-basis: calc(100% - 56px); }
	.so-row > .p-badge { margin-left: 56px; }
}
.so-account.is-problem .so-account-msg { color: var(--danger); font-weight: 600; }
.so-account code { font-size: 12px; word-break: break-all; }
.so-connectors { list-style: none; margin: 10px 0 0; padding: 0; }
.so-connectors li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }

/* Assets */
.so-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.so-tile { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.so-tile:hover { border-color: var(--violet-hi); box-shadow: var(--shadow-1); }
.so-tile.is-on { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.so-tile-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--muted-soft); color: var(--mute); overflow: hidden; }
.so-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.so-tile-icon .p-i { width: 30px; height: 30px; }
.so-tile-badge { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11.5px; font-weight: 700; }
.so-tile-badge .p-i { width: 13px; height: 13px; }
.so-tile-ever { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #FFD166; }
.so-tile-ever .p-i { width: 14px; height: 14px; }
.so-tile-title { padding: 6px 10px 0; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-tile-sub { padding: 0 10px 10px; font-size: 12px; color: var(--mute); }
.so-tiles-pick { max-height: 55vh; overflow: auto; }
.so-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line-2); border-radius: 16px; text-align: center; cursor: pointer; color: var(--text-2); }
.so-drop .p-i { width: 28px; height: 28px; color: var(--violet); }
.so-drop.is-over { border-color: var(--violet); background: var(--violet-soft); }
.so-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.so-upls { display: flex; flex-direction: column; gap: 8px; }
.so-upl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.so-upl .p-bar { grid-column: 1 / -1; }
.so-upl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-upl.is-done .so-upl-pct { color: var(--ok); font-weight: 700; }
.so-upl.is-error .so-upl-pct { color: var(--danger); font-weight: 700; }
.so-preview-media { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #000; }

/* Post editor */
.so-versions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 16px; }
.so-vtab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--text); cursor: pointer; }
.so-vtab.is-on { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet-soft); }
.so-vtab.is-add { padding-left: 8px; color: var(--violet-ink); border-style: dashed; }
.so-vtab.is-add .p-i { width: 15px; height: 15px; }
.so-vtab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.so-vtab-dot.is-approved, .so-vtab-dot.is-published { background: var(--ok); }
.so-vtab-dot.is-client_review { background: var(--warn); }
.so-vtab-dot.is-revision_requested, .so-vtab-dot.is-failed { background: var(--danger); }
.so-vtab-dot.is-scheduled, .so-vtab-dot.is-internal_review { background: var(--info); }
.so-checks { padding: 12px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); margin-bottom: 18px; font-size: 14px; }
.so-checks.is-block { background: var(--danger-soft); color: var(--danger); }
.so-checks ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.so-checks li { display: flex; align-items: center; gap: 8px; }
.so-checks li.is-warn { color: var(--warn); }
.so-checks .p-i { width: 15px; height: 15px; flex: 0 0 auto; }
.so-caption { min-height: 180px; font-size: 15px; line-height: 1.55; }
.so-counter { display: flex; gap: 14px; justify-content: flex-end; font-size: 12.5px; color: var(--mute); margin-top: -6px; }
.so-counter .is-over { color: var(--danger); font-weight: 700; }
.so-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px -20px -20px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.so-details { display: flex; flex-direction: column; gap: 12px; }
.so-details select, .so-details input:not([type=checkbox]) { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.so-datetime { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.so-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.so-media-item { position: relative; display: flex; flex-direction: column; gap: 4px; }
.so-media-item img, .so-media-item .so-tile-icon { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--muted-soft); display: grid; place-items: center; color: var(--mute); }
.so-media-title { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-media-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.so-media-x .p-i { width: 14px; height: 14px; }
.so-final { white-space: pre-wrap; word-break: break-word; font: 14px/1.5 var(--f-text); padding: 12px 14px; border-radius: 12px; background: var(--muted-soft); max-height: 280px; overflow: auto; margin: 10px 0; }
.so-manual { border-color: var(--violet-hi); }
.so-vlist { list-style: none; margin: 0; padding: 0; }
.so-vlist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.so-vlist li:first-child { border-top: 0; }
.so-meta { text-align: center; }

/* Approximate platform preview */
.so-pv { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); font-size: 13.5px; }
.so-pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.so-pv-head b { display: block; font-size: 13.5px; }
.so-pv-head span:not(.so-pv-av) { font-size: 12px; color: var(--mute); }
.so-pv-av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pc); color: #fff; font-weight: 800; font-size: 12px; flex: 0 0 auto; }
.so-pv-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--muted-soft); color: var(--mute); }
.so-pv.is-vertical .so-pv-media { aspect-ratio: 9 / 16; max-height: 420px; }
.so-pv-media img { width: 100%; height: 100%; object-fit: cover; }
.so-pv-media.is-empty { gap: 4px; font-size: 13px; }
.so-pv-count { position: absolute; right: 10px; top: 10px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; }
.so-pv-text { padding: 10px 12px; white-space: pre-line; word-break: break-word; }
.so-pv-title { padding: 10px 12px 0; font-weight: 700; }
.so-pv-linkedin .so-pv-av, .so-pv-youtube .so-pv-av { border-radius: 8px; }

/* Phones and small tablets: intentional layouts, not a shrunken desktop. */
@media (max-width: 700px) {
	.so-cal-bar { flex-direction: column; align-items: stretch; }
	.so-cal-filters { display: grid; grid-template-columns: 1fr 1fr; }
	.so-cal-filters .p-seg { grid-column: 1 / -1; justify-content: space-between; }
	.so-cal-filters .p-seg-btn { flex: 1; }
	.so-cal-filters .so-clientpick { grid-column: 1 / -1; }
	.so-day { min-height: 64px; padding: 3px; }
	.so-dow { padding: 6px 2px; text-align: center; font-size: 10.5px; }
	.so-add, .so-more { display: none; }
	.so-day-items { flex-direction: row; flex-wrap: wrap; gap: 3px; }
	.so-chip { padding: 0; width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line-2); }
	.so-chip > :not(.so-chip-dot) { display: none; }
	.so-chip.is-client_review { background: var(--warn); }
	.so-chip.is-revision_requested, .so-chip.is-failed { background: var(--danger); }
	.so-chip.is-approved, .so-chip.is-published { background: var(--ok); }
	.so-chip.is-scheduled, .so-chip.is-internal_review { background: var(--info); }
	.so-day-num { padding: 2px 4px; font-size: 12px; }
	.so-week { grid-template-columns: 1fr; }
	.so-weekday { min-height: 0; }
	.so-agenda-row { flex-wrap: wrap; }
	.so-agenda-row .so-row { flex-basis: calc(100% - 42px); }
	.so-move { margin-left: 42px; }
	.so-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.so-savebar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); }
	.so-bulk { top: 8px; }
	.p-tabbar .p-tab { font-size: 10.5px; }
}

/* ==========================================================================
   Communications (staff) — .mc-*
   ========================================================================== */
.mc-tabs { margin-bottom: 14px; }
.mc-tabs .p-count { margin-left: 2px; }
.mc-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mc-banner .p-i { width: 18px; height: 18px; }
.mc-banner .p-btn { margin-left: auto; }
.mc-syncbtn.is-busy .p-i { animation: mc-spin 1s linear infinite; }
@keyframes mc-spin { to { transform: rotate(360deg); } }

.mc-split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); height: max(540px, calc(100vh - 250px)); overflow: hidden; }
.mc-listpane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mc-toolbar { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.mc-toolbar .p-input { height: 38px; flex: 1; min-width: 0; }
.mc-toolbar select.p-input { flex: 0 1 180px; }
.mc-searchnote { padding: 8px 14px; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-list { overflow-y: auto; flex: 1; }
.mc-more { padding: 12px; text-align: center; }
.mc-more:empty { display: none; }
.mc-row { position: relative; display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.mc-row:hover { background: var(--muted-soft); }
.mc-row.is-active { background: var(--violet-soft); box-shadow: inset 3px 0 0 var(--violet); }
.mc-row.is-unread .mc-who, .mc-row.is-unread .mc-subj { font-weight: 800; color: var(--text); }
.mc-row.is-unread::before { content: ""; position: absolute; left: 4px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
.mc-av { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--hue, 260) 60% 92%); color: hsl(var(--hue, 260) 45% 30%); font-weight: 800; font-size: 13px; }
:root[data-theme="dark"] .mc-av { background: hsl(var(--hue, 260) 35% 22%); color: hsl(var(--hue, 260) 70% 85%); }
.mc-row-main { flex: 1; min-width: 0; }
.mc-row-top { display: flex; align-items: baseline; gap: 8px; }
.mc-who { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.mc-n { color: var(--mute); font-weight: 600; font-size: 12px; }
.mc-when { flex: 0 0 auto; font-size: 12px; color: var(--mute); }
.mc-row.is-unread .mc-when { color: var(--violet-ink); font-weight: 700; }
.mc-subj { font-size: 14px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.mc-snip { font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.mc-acct { font-size: 11.5px; color: var(--mute); margin-top: 2px; }
.mc-clip { display: inline-flex; color: var(--mute); }
.mc-clip .p-i { width: 13px; height: 13px; }
.mc-star { align-self: flex-start; border: 0; background: none; padding: 2px; color: var(--line-2); cursor: pointer; margin-top: 18px; }
.mc-star .p-i { width: 18px; height: 18px; }
.mc-star.is-on { color: #E8A317; }
.mc-star.is-on .p-i { fill: currentColor; }

.mc-reader { min-width: 0; min-height: 0; padding: 0 0 24px; overflow-y: auto; }
.mc-reader-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; min-height: 360px; color: var(--mute); }
.mc-reader-empty .p-i { width: 40px; height: 40px; opacity: .5; }
.mc-actions { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mc-back { display: none; }
.mc-spacer { flex: 1; }
.mc-subject { font: 800 clamp(20px, 2.2vw, 24px)/1.25 var(--f-display); padding: 18px 20px 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-images { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 20px; padding: 8px 12px; border-radius: 10px; background: var(--muted-soft); font-size: 13px; color: var(--text-2); }
.mc-images .p-i { width: 16px; height: 16px; }
.mc-msgs { display: flex; flex-direction: column; padding: 8px 20px; gap: 10px; }
.mc-older { align-self: center; border: 1px dashed var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--violet-ink); cursor: pointer; }
.mc-msg { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.mc-msg.is-hidden { display: none; }
.mc-msg.is-out { border-left: 3px solid var(--violet-hi); }
.mc-msg-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); }
.mc-msg-head:hover { background: var(--muted-soft); }
.mc-msg-who { flex: 1; min-width: 0; }
.mc-msg-who p { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-email { color: var(--mute); font-size: 13px; }
.mc-msg-to { color: var(--mute); font-size: 13px !important; }
.mc-msg-when { font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.mc-msg-body { display: none; padding: 0 14px 14px 62px; }
.mc-msg.is-open .mc-msg-body { display: block; }
.mc-framewrap { position: relative; border-radius: 10px; }
.mc-framewrap.is-dark { background: #fff; padding: 10px; }
.mc-frame { display: block; width: 100%; height: 160px; border: 0; background: #fff; border-radius: 6px; }
.mc-quote { margin-top: 4px; border: 1px solid var(--line-2); background: var(--muted-soft); color: var(--text-2); border-radius: 6px; padding: 0 8px; font-weight: 800; letter-spacing: 2px; cursor: pointer; }
.mc-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; margin-top: 12px; }
.mc-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.mc-file-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--violet-soft); color: var(--violet-ink); flex: 0 0 auto; }
.mc-file-main { flex: 1; min-width: 0; }
.mc-file-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-replybar { padding: 6px 20px 0; }
.mc-replybox { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--mute); font-size: 15px; text-align: left; cursor: text; }
.mc-replybox:hover { border-color: var(--violet-hi); }
.mc-readonly { padding: 8px 20px; }

/* Composer: docked on desktop, full screen on phones */
.mc-compose { position: fixed; right: 24px; bottom: 0; z-index: 250; width: min(640px, calc(100vw - 48px)); max-height: calc(100vh - 60px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .35); }
.mc-compose.is-over { outline: 3px dashed var(--violet); outline-offset: -8px; }
.mc-compose-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); background: var(--ink); color: #fff; border-radius: 16px 16px 0 0; }
.mc-compose-head .p-muted { color: #bdb6cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-compose-head .p-iconbtn { color: #fff; }
.mc-compose-fields { padding: 4px 18px; }
.mc-field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.mc-field.is-hidden { display: none; }
.mc-field > span { flex: 0 0 56px; font-size: 13px; color: var(--mute); }
.mc-field input, .mc-field select { flex: 1; min-width: 0; border: 0; background: none; height: 36px; font-size: 15px; color: var(--text); outline: none; }
.mc-link { border: 0; background: none; color: var(--violet-ink); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.mc-tools { display: flex; align-items: center; gap: 2px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.mc-tools button { min-width: 32px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--text-2); cursor: pointer; font-size: 14px; display: inline-grid; place-items: center; }
.mc-tools button:hover { background: var(--muted-soft); }
.mc-tools .p-i { width: 16px; height: 16px; }
.mc-editor { flex: 1; min-height: 200px; overflow-y: auto; padding: 14px 18px; font-size: 15px; line-height: 1.55; outline: none; color: var(--text); }
.mc-editor .pilot-sig { color: var(--text-2); }
.mc-editor a { color: var(--violet-ink); }
.mc-quoted-note { display: flex; align-items: center; gap: 6px; padding: 0 18px 6px; font-size: 12.5px; color: var(--mute); }
.mc-quoted-note .p-i { width: 14px; height: 14px; }
.mc-fwdfiles { padding: 0 18px 8px; }
.mc-attachlist { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px; }
.mc-attachlist:empty { display: none; }
.mc-chip { display: inline-grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; max-width: 280px; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.mc-chip .p-bar { grid-column: 1 / -1; height: 4px; }
.mc-chip button { border: 0; background: none; color: var(--mute); cursor: pointer; display: inline-grid; }
.mc-chip .p-i { width: 14px; height: 14px; }
.mc-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-chip.is-error { border-color: var(--danger); color: var(--danger); }
.mc-compose-foot { display: flex; align-items: center; gap: 8px; padding: 10px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* Accounts */
.mc-connect .p-card-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 20px; }
.mc-connect h2 { font: 800 22px/1.2 var(--f-display); }
.mc-connect .p-muted { max-width: 520px; }
.mc-connect-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--violet-soft); color: var(--violet-ink); }
.mc-connect-icon .p-i { width: 28px; height: 28px; }
.mc-acct-top { display: flex; align-items: center; gap: 12px; }
.mc-acct-top > div { flex: 1; min-width: 0; }
.mc-accesslist { display: flex; flex-direction: column; }
.mc-access { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.mc-access > span { flex: 1; font-size: 14px; }
.mc-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); }
.mc-facts li { display: flex; gap: 10px; }
.mc-facts .p-i { flex: 0 0 auto; width: 18px; height: 18px; color: var(--violet-ink); margin-top: 2px; }

@media (max-width: 1000px) {
	.mc-split { grid-template-columns: 1fr; border: 0; background: none; box-shadow: none; height: auto; overflow: visible; }
	.mc-list { overflow: visible; }
	.mc-reader { overflow: visible; }
	.mc-listpane { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
	.mc-split.is-reading .mc-listpane { display: none; }
	.mc-split:not(.is-reading) .mc-reader { display: none; }
	.mc-reader { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
	.mc-back { display: inline-grid; }
	.mc-actions { top: 64px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
	.mc-is-reading > .p-pagehead, .mc-is-reading > .mc-tabs, .mc-is-reading > .mc-banner { display: none; }
}
@media (max-width: 640px) {
	.mc-tabs { margin-left: -4px; margin-right: -4px; }
	.mc-msgs { padding: 8px 10px; }
	.mc-msg-body { padding: 0 10px 12px; }
	.mc-subject { padding: 14px 14px 4px; }
	.mc-actions { padding: 8px 10px; gap: 4px; }
	.mc-actions .p-btn { padding-left: 12px; padding-right: 12px; }
	.mc-replybar { padding: 6px 10px 0; }
	.mc-compose { inset: 0; width: 100%; max-height: none; border-radius: 0; border: 0; }
	.mc-compose-head { border-radius: 0; padding-top: calc(10px + env(safe-area-inset-top)); }
	.mc-hint { display: none; }
	body.mc-composing { overflow: hidden; }
	body.mc-composing .p-tabbar { display: none; }
}
.p-row-inline { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mc-divider { height: 1px; background: var(--line); margin: 8px 0; }

/* ==========================================================================
   Workspaces, Projects pipeline, Contacts, Inbox links (v0.6 — HoneyBook model)
   ========================================================================== */

/* ---------- Home: headline numbers ---------- */
.p-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.p-kpi { display: block; padding: 16px 20px; text-decoration: none; border-left: 1px solid var(--line); }
.p-kpi:first-child { border-left: 0; }
a.p-kpi:hover { background: var(--surface-2); }
.p-kpi-label { color: var(--mute); font-size: 13px; font-weight: 500; }
.p-kpi-value { margin-top: 2px; font: 800 30px/1.1 var(--f-display); font-variation-settings: "wdth" 104; letter-spacing: -.01em; }
.p-kpi-hint { color: var(--mute); font-size: 12.5px; }
.p-mt-grid { margin-top: 18px; }

/* ---------- Segmented links (view switch) ---------- */
a.p-seg-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.p-seg-btn .p-i { width: 15px; height: 15px; }

/* ---------- Pipeline ---------- */
.p-pl-stages { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px 16px; scrollbar-width: thin; }
.p-pl-stage { flex: 1 0 118px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.p-pl-stage:hover { border-color: var(--line-2); }
.p-pl-stage.is-on { border-color: var(--violet); box-shadow: inset 0 -3px 0 var(--violet); }
.p-pl-stage.is-archived { background: var(--surface-2); }
.p-pl-n { font: 800 22px/1.1 var(--f-display); }
.p-pl-label { color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.p-pl-stage.is-on .p-pl-label { color: var(--violet-ink); }
.p-pl-toolbar .p-pl-count { margin-left: auto; }
.p-pl-tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow-x: auto; }
.p-pl-tablewrap > .p-empty { padding: 36px 16px; }
.p-pl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-pl-table th { position: sticky; top: 0; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.p-pl-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-pl-table tbody tr:last-child td { border-bottom: 0; }
.p-pl-row { cursor: pointer; }
.p-pl-row:hover td { background: var(--surface-2); }
.p-pl-row:focus-visible { outline: 3px solid var(--violet-hi); outline-offset: -3px; }
.p-pl-name { min-width: 200px; }
.p-pl-name a { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; color: var(--text); }
.p-pl-name a:hover { color: var(--violet-ink); }
.p-pl-row.is-unread .p-pl-name a { font-weight: 800; }
.p-pl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); flex: none; }
.p-pl-kind, .p-pl-sub { display: block; color: var(--mute); font-size: 12.5px; }
.p-pl-client { display: block; }
.p-pl-when { color: var(--mute); white-space: nowrap; }
.p-pl-team .p-avatar { width: 28px; height: 28px; font-size: 11px; }
.p-pl-stagechip { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--muted-soft); color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.p-pl-stagechip.is-inquiry { background: var(--info-soft); color: var(--info); }
.p-pl-stagechip.is-meeting, .p-pl-stagechip.is-proposal, .p-pl-stagechip.is-contract, .p-pl-stagechip.is-deposit { background: var(--warn-soft); color: var(--warn); }
.p-pl-stagechip.is-active { background: var(--violet-soft); color: var(--violet-ink); }
.p-pl-stagechip.is-completed { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 1100px) { .p-pl-hide-md { display: none; } }
@media (max-width: 700px) { .p-pl-hide-sm { display: none; } .p-pl-name { min-width: 140px; } .p-pl-table td, .p-pl-table th { padding: 10px; } }

/* ---------- Workspace header ---------- */
.p-ws-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; margin-bottom: 14px; }
.p-ws-cover { position: relative; height: 92px; background: var(--grad); }
.p-ws-cover[data-seed="video"] { background: linear-gradient(100deg, #3A1FB8 0%, #5B2EFF 60%, #8A3FE8 100%); }
.p-ws-cover[data-seed="photo"] { background: linear-gradient(100deg, #1D2B6B 0%, #2458C6 55%, #5B2EFF 100%); }
.p-ws-cover[data-seed="website"] { background: linear-gradient(100deg, #0F5E4A 0%, #0F8A5F 50%, #2458C6 100%); }
.p-ws-cover[data-seed="graphic"] { background: linear-gradient(100deg, #8A3FE8 0%, #B65CE0 55%, #E07A5C 100%); }
.p-ws-cover[data-seed="social"] { background: linear-gradient(100deg, #B65CE0 0%, #E0527A 60%, #F2B24C 100%); }
.p-ws-crumb { position: absolute; left: 16px; top: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border-radius: var(--r-pill); background: rgba(15, 13, 22, .28); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); }
.p-ws-crumb:hover { background: rgba(15, 13, 22, .45); }
.p-ws-crumb .p-i { width: 15px; height: 15px; }
.p-ws-cover-mark { position: absolute; right: 18px; bottom: -22px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--ink); color: #fff; font: 800 22px/1 var(--f-display); border: 4px solid var(--surface); }
.p-ws-headbody { padding: 16px 20px 16px; }
.p-ws-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-right: 76px; }
.p-ws-titles { min-width: 0; }
.p-ws-title { font: 800 clamp(24px, 3vw, 32px)/1.1 var(--f-display); font-variation-settings: "wdth" 108; letter-spacing: -.02em; overflow-wrap: anywhere; }
.p-ws-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; color: var(--text-2); font-size: 13.5px; }
.p-ws-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.p-ws-meta .p-i { width: 15px; height: 15px; color: var(--mute); }
.p-ws-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-ws-peoplerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.p-ws-visible { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.p-ws-visible .p-i { width: 15px; height: 15px; }
.p-ws-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.p-ws-person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: var(--r-pill); text-decoration: none; background: var(--surface); max-width: 240px; }
.p-ws-person:hover { border-color: var(--line-2); background: var(--surface-2); }
.p-ws-person .p-avatar { width: 28px; height: 28px; font-size: 11px; }
.p-ws-person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.p-ws-person-name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-ws-person-role { font-size: 10.5px; color: var(--mute); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.p-ws-more { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: var(--r-pill); background: var(--muted-soft); color: var(--text-2); font-size: 12px; font-weight: 700; }
.p-ws-add { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border: 1px dashed var(--line-2); border-radius: var(--r-pill); background: none; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.p-ws-add:hover { border-color: var(--violet); color: var(--violet-ink); }
.p-ws-add .p-i { width: 15px; height: 15px; }
.p-ws-team { display: flex; margin-left: auto; }
.p-ws-teamav + .p-ws-teamav { margin-left: -8px; }
.p-ws-teamav .p-avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid var(--surface); background: var(--ink); color: #fff; }
.p-ws-track { margin-bottom: 14px; }
.p-ws-track .p-card-body { padding: 14px 18px; }
.p-ws-pipe { margin-bottom: 14px; }

/* ---------- Workspace tabs + grid ---------- */
.p-ws-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; scrollbar-width: none; }
.p-ws-tabs::-webkit-scrollbar { display: none; }
.p-ws-tab { flex: none; display: inline-flex; align-items: center; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text-2); font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.p-ws-tab:hover { color: var(--text); }
.p-ws-tab.is-on { color: var(--violet-ink); border-bottom-color: var(--violet); }
.p-ws-tab .p-count { margin-left: 6px; }
.p-ws-tab.is-on .p-count { background: var(--violet-soft); color: var(--violet-ink); }
.p-ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.p-ws-panel { min-width: 0; }
.p-ws-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.p-ws-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.p-ws-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.p-ws-side-head h2 { font: 700 14px/1.3 var(--f-text); margin-right: auto; }
.p-ws-lock { display: inline-flex; align-items: center; gap: 3px; color: var(--mute); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.p-ws-lock .p-i { width: 12px; height: 12px; }
.p-ws-side-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; font-size: 14px; }
.p-ws-field { display: flex; flex-direction: column; gap: 4px; }
.p-ws-field-label { color: var(--mute); font-size: 12px; font-weight: 600; }
.p-ws-field-val .p-select-inline { width: 100%; height: 36px; }
.p-ws-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.p-ws-tasks li { display: flex; align-items: flex-start; gap: 8px; }
.p-ws-tasks li > span:nth-child(2) { flex: 1; }
.p-ws-tasks .p-i { width: 15px; height: 15px; margin-top: 3px; color: var(--mute); }
@media (max-width: 1000px) { .p-ws-grid { grid-template-columns: minmax(0, 1fr); } .p-ws-aside { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 640px) {
	.p-ws-cover { height: 64px; }
	.p-ws-cover-mark { width: 48px; height: 48px; font-size: 17px; border-radius: 12px; bottom: -16px; }
	.p-ws-titlerow { padding-right: 0; }
	.p-ws-headbody { padding: 18px 16px 14px; }
	.p-ws-actions { width: 100%; }
	.p-ws-team { margin-left: 0; }
}

/* ---------- Activity: composer, waiting, feed ---------- */
.p-ws-composer { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.p-ws-compose { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface-2); color: var(--mute); text-align: left; cursor: text; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-ws-compose:hover { border-color: var(--violet); color: var(--text-2); }
.p-ws-hint { display: flex; align-items: flex-start; gap: 6px; }
.p-ws-hint .p-i { width: 15px; height: 15px; margin-top: 2px; }
.p-card-waiting { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.p-ws-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.p-ws-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; background: var(--surface); }
a.p-ws-file:hover { border-color: var(--line-2); background: var(--surface-2); }
.p-ws-file-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--violet-soft); color: var(--violet-ink); }
.p-ws-file-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.p-ws-step { color: var(--warn); font-size: 12px; font-weight: 700; white-space: nowrap; }
.p-ws-sched { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.p-ws-stats { margin-top: 0; }
.p-ws-origin { margin-top: 14px; text-align: center; color: var(--mute); font-size: 12.5px; }
.p-card-feed .p-card-head { flex-wrap: wrap; }
.p-wsf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.p-wsf-day { position: sticky; top: 64px; z-index: 1; display: flex; justify-content: center; margin: 6px 0 0; pointer-events: none; }
.p-wsf-day span { padding: 3px 12px; border-radius: var(--r-pill); background: var(--muted-soft); color: var(--text-2); font-size: 12px; font-weight: 700; }
.p-wsf-item { display: flex; gap: 12px; align-items: flex-start; }
.p-wsf-av .p-avatar { width: 34px; height: 34px; font-size: 12px; }
.p-wsf-mail.is-out .p-wsf-av .p-avatar { background: var(--ink); color: #fff; }
.p-wsf-card { flex: 1; min-width: 0; display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.p-wsf-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.p-wsf-mail.is-unread .p-wsf-card { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--violet); }
.p-wsf-proj { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--muted-soft); color: var(--text-2); font-size: 12px; font-weight: 600; }
.p-wsf-proj .p-i { width: 13px; height: 13px; }
.p-wsf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-wsf-from { min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-wsf-when { flex: none; color: var(--mute); font-size: 12.5px; }
.p-wsf-subj { margin-top: 4px; font-weight: 700; }
.p-wsf-snip { margin-top: 2px; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-wsf-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.p-wsf-foot .p-tag { margin-left: 0; }
.p-tag-new { background: var(--violet-soft); color: var(--violet-ink); }
.p-wsf-open { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--violet-ink); font-size: 13px; font-weight: 600; }
.p-wsf-open .p-i { width: 14px; height: 14px; }
.p-wsf-event { padding: 2px 0 2px 6px; }
.p-wsf-ico { display: grid; place-items: center; width: 26px; height: 26px; flex: none; margin-left: 4px; border-radius: 50%; background: var(--muted-soft); color: var(--text-2); }
.p-wsf-ico .p-i { width: 14px; height: 14px; }
.p-wsf-evbody { flex: 1; min-width: 0; padding-top: 2px; }
.p-wsf-evtext { font-size: 14px; }
.p-wsf-evmeta { color: var(--mute); font-size: 12.5px; }
.p-wsf-private { margin-left: 6px; color: var(--mute); font-weight: 600; }

/* ---------- Contacts ---------- */
.p-ct-name { display: inline-flex; align-items: center; gap: 10px; }
.p-ct-name .p-avatar { width: 30px; height: 30px; font-size: 11px; }
.p-ct-profile .p-card-body { gap: 14px; }
.p-ct-hero { display: flex; align-items: center; gap: 14px; }
.p-ct-av { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--grad); color: #fff; font: 800 22px/1 var(--f-display); }
.p-ct-title { font: 800 24px/1.15 var(--f-display); overflow-wrap: anywhere; }
.p-ct-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
@media (max-width: 900px) { .p-ct-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Inbox: which project a conversation belongs to ---------- */
.mc-proj { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--violet-ink); font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mc-proj .p-i { width: 13px; height: 13px; flex: none; }
.mc-proj.is-none { color: var(--mute); font-weight: 500; }
.mc-proj-org { color: var(--mute); font-weight: 500; }
.mc-linkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 20px 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--violet-soft); color: var(--text); font-size: 14px; }
.mc-linkbar.is-none { background: var(--warn-soft); }
.mc-linkbar > .p-i { width: 16px; height: 16px; color: var(--violet-ink); }
.mc-linkbar.is-none > .p-i { color: var(--warn); }
.mc-linkbar a { color: var(--violet-ink); font-weight: 700; }
.mc-auto { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--surface); color: var(--mute); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mc-compose-link { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--violet-soft); color: var(--violet-ink); font-size: 12px; font-weight: 600; }
.mc-compose-link .p-i { width: 13px; height: 13px; }
.mc-pick { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; }
.mc-pick .p-eyebrow { margin: 10px 0 2px; }
.mc-pick-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; }
.mc-pick-row:hover, .mc-pick-row:focus-visible { border-color: var(--violet); background: var(--violet-soft); }
.mc-pick-row.is-on { border-color: var(--violet); }
.mc-pick-row > .p-i { color: var(--violet-ink); }
.mc-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-grid-3 > .p-card + .p-card { margin-top: 0; }

/* ==========================================================================
   Social operations (v0.7): overview, accounts, composer, inbox, analytics,
   assets, settings, calendar extras. Uses the same tokens as the rest of Pilot.
   ========================================================================== */
.so-grouplabel { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.so-ovbar { flex-wrap: wrap; gap: 8px; }
.so-custom { display: inline-flex; gap: 6px; align-items: center; }
.so-custom[hidden] { display: none; }
.so-datastate { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin: 12px 0 16px; border-radius: var(--r-md); font-size: 14px; background: var(--muted-soft); color: var(--text-2); }
.so-datastate.is-ok { background: var(--ok-soft); color: var(--ok); }
.so-datastate.is-partial, .so-datastate.is-stale { background: var(--warn-soft); color: var(--warn); }
.so-datastate.is-disconnected, .so-datastate.is-empty { background: var(--info-soft); color: var(--info); }
.so-datastate .p-muted { color: inherit; opacity: .8; }
.so-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.so-kpi .p-stat-value { font-variant-numeric: tabular-nums; }
.so-delta { display: block; margin-top: 4px; color: var(--mute); }
.so-delta.is-up { color: var(--ok); }
.so-delta.is-down { color: var(--danger); }
.so-defs { margin: 8px 0 18px; }
.so-health, .so-acctlist, .so-tasks, .so-netcounts, .so-results, .so-checklist, .so-ailist { list-style: none; margin: 0; padding: 0; }
.so-health-row, .so-acct { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.so-health-row:first-child, .so-acct:first-child { border-top: 0; }
.so-health-row .so-plat, .so-acct > .so-plat { margin-top: 2px; }
.so-health-main, .so-acct-main { flex: 1; min-width: 0; }
.so-health-main p, .so-acct-main p { margin: 2px 0 0; }
.so-acct-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 !important; }
.so-acct-msg { color: var(--warn); }
.so-acct-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 46%; }
.so-acct.is-focus { background: var(--violet-soft); border-radius: var(--r-md); padding-left: 10px; padding-right: 10px; }
.so-acct.is-failed .so-acct-name b, .so-health-row.is-failed b { color: var(--danger); }
.so-bignum { font: 800 34px/1.1 var(--f-display); margin: 0 0 8px; }
.so-netcounts { display: grid; gap: 6px; margin: 8px 0 12px; }
.so-netcounts li { display: grid; grid-template-columns: auto 60px 1fr; align-items: center; gap: 10px; }
.so-netcounts .so-platlabel { font-size: 13px; }
.so-tasks { display: flex; flex-direction: column; gap: 10px; }
.so-task { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.so-task p { margin: 2px 0 0; }
.so-task a { font-weight: 600; color: var(--text); text-decoration: none; }
.so-task a:hover { color: var(--violet-ink); }
.so-task-box { width: 18px; height: 18px; border: 2px solid var(--line-2); border-radius: 5px; display: grid; place-items: center; margin-top: 2px; }
.so-task.is-done .so-task-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.so-task.is-done a { text-decoration: line-through; color: var(--mute); }
.so-reflist { margin: 6px 0 0; padding-left: 18px; }

/* Composer */
.so-acctpick { display: flex; flex-wrap: wrap; gap: 8px; }
.so-acctchip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; }
.so-acctchip:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.so-acctchip span { display: flex; flex-direction: column; line-height: 1.2; }
.so-acctchip small { color: var(--mute); font-size: 11.5px; }
.so-ctabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.so-ctab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: 600 13px var(--f-text); cursor: pointer; white-space: nowrap; }
.so-ctab.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.so-ctab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-hi); }
.so-counters { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--mute); }
.so-counters span { display: inline-flex; align-items: center; gap: 5px; }
.so-counters .is-over { color: var(--danger); font-weight: 700; }
.so-cmedia { margin-top: 16px; }
.so-pvwrap { margin-top: 16px; }
.so-notes { margin: 10px 0; padding-left: 18px; }
.so-ok { color: var(--ok); display: flex; align-items: center; gap: 6px; }
.so-pubacts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.so-results li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.so-results li:first-child { border-top: 0; }
.so-results p { margin: 2px 0 0; }

/* Inbox */
.so-freshness { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.so-fresh { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill); background: var(--muted-soft); font-size: 12px; color: var(--text-2); }
.so-fresh.is-ok { background: var(--ok-soft); color: var(--ok); }
.so-fresh.is-error, .so-fresh.is-stale { background: var(--warn-soft); color: var(--warn); }
.so-inbox { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 16px; align-items: start; }
.so-inbox-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.so-inbox-list .p-empty { padding: 28px 16px; }
.so-conv { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.so-conv:first-child { border-top: 0; }
.so-conv:hover { background: var(--surface-2); }
.so-conv.is-on { background: var(--violet-soft); }
.so-conv.is-unread b { color: var(--violet-ink); }
.so-conv-main { flex: 1; min-width: 0; }
.so-conv-top { display: flex; justify-content: space-between; gap: 8px; margin: 0; }
.so-conv-snip { margin: 3px 0 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-inbox-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-height: 320px; }
.so-pane-empty { text-align: center; margin-top: 110px; }
.so-conv-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.so-conv-head h2 { margin: 0; font: 700 18px var(--f-display); }
.so-conv-head p { margin: 2px 0; }
.so-conv-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.so-msgs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.so-msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: var(--muted-soft); }
.so-msg.is-out { align-self: flex-end; background: var(--violet-soft); }
.so-msg-meta { margin: 0 0 4px; font-size: 11.5px; color: var(--mute); }
.so-msg-body { margin: 0; white-space: pre-wrap; }
.so-reply { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.so-reply textarea { width: 100%; }
.so-summary { padding: 10px 14px; border-radius: var(--r-md); background: var(--info-soft); color: var(--text); margin-bottom: 12px; }
.so-summary p { margin: 2px 0; }
.so-convnotes { margin-top: 14px; }

/* Analytics / tables */
.so-tablewrap { overflow-x: auto; }
.so-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.so-table th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.so-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.so-table td .p-badge { margin-top: 4px; }
.so-table code { font-size: 12px; }
.so-facts { margin: 0; padding-left: 18px; }
.so-defs-list { margin: 0; }
.so-defs-list dt { font-weight: 700; margin-top: 8px; }
.so-defs-list dd { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }

/* Assets */
.so-assetlayout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.so-folders { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 12px; }
.so-folder-row { display: flex; align-items: center; gap: 4px; }
.so-folder { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font: 500 14px var(--f-text); text-align: left; cursor: pointer; }
.so-folder:hover { background: var(--muted-soft); }
.so-folder.is-on { background: var(--violet-soft); color: var(--violet-ink); font-weight: 700; }
.so-folder .p-count { margin-left: auto; }
.so-tile-meta { display: block; padding: 0 10px 10px; font-size: 11.5px; color: var(--mute); text-align: left; }
.so-kvlist { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.so-kvlist dt { color: var(--mute); }
.so-kvlist dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Settings */
.so-tabs { display: flex; width: fit-content; margin: 4px 0 18px; overflow-x: auto; max-width: 100%; }
.so-toolseg { display: flex; max-width: 100%; overflow-x: auto; }
.so-toolseg .p-seg-btn { white-space: nowrap; }
.so-setsave { position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); }
@media (max-width: 640px) { .so-setsave { bottom: calc(72px + env(safe-area-inset-bottom)); } }
.so-tabs a { text-decoration: none; }
.so-setrow { display: grid; grid-template-columns: 1fr minmax(160px, 260px); gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.so-setrow:first-child { border-top: 0; }
.so-setrow p { margin: 2px 0 0; }
.so-setctl { display: flex; justify-content: flex-end; }
.so-setctl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--violet); }
.so-ailist li { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.so-checkgroup { margin-top: 14px; }
.so-checklist li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 14px; }
.so-checklist li.is-pass { color: var(--ok); }
.so-checklist li.is-pass span { color: var(--text); }
.so-checklist li.is-fail { color: var(--danger); }

/* Calendar extras */
.so-cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.so-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.so-leg-pilot { background: var(--muted-soft); border-left: 3px solid var(--violet); }
.so-leg-ext { border: 1.5px dashed var(--line-2); }
.so-leg-note { background: #FFF3C4; }
.so-leg-hol { background: var(--info-soft); }
.so-holiday { margin: 2px 0 4px; font-size: 11px; font-weight: 700; color: var(--info); line-height: 1.2; }
.so-day-extras { display: flex; flex-direction: column; gap: 3px; margin-top: 3px; }
.so-note-chip { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border: 0; border-radius: 6px; background: #FFF3C4; color: #6B5300; font: 600 11.5px/1.25 var(--f-text); text-align: left; cursor: pointer; min-width: 0; }
.so-note-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-note-chip.is-blue { background: var(--info-soft); color: var(--info); }
.so-note-chip.is-green { background: var(--ok-soft); color: var(--ok); }
.so-note-chip.is-amber { background: var(--warn-soft); color: var(--warn); }
.so-note-chip.is-red { background: var(--danger-soft); color: var(--danger); }
.so-note-chip.is-purple { background: var(--violet-soft); color: var(--violet-ink); }
.so-ext-chip { display: flex; align-items: center; gap: 5px; padding: 3px 6px 3px 4px; border: 1.5px dashed var(--line-2); border-radius: 7px; color: var(--text-2); text-decoration: none; font-size: 12px; line-height: 1.25; min-width: 0; }
.so-ext-chip .so-plat { min-width: 18px; height: 18px; font-size: 9.5px; border-radius: 5px; }
.so-ext-tag { margin-left: auto; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.so-chip-thumb { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; flex: 0 0 auto; }
.so-month:not(.is-large) .so-chip-thumb { display: none; }
.so-chip.is-pilot-scheduled { border-left-color: var(--violet); }
.so-agenda-extras { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.so-agenda-extras .so-ext-chip, .so-agenda-extras .so-note-chip { font-size: 13px; padding: 8px 10px; }

@media (max-width: 900px) {
	.so-inbox { grid-template-columns: 1fr; }
	.so-inbox-pane { min-height: 0; }
	.so-assetlayout { grid-template-columns: 1fr; }
	.so-folders { position: static; flex-direction: row; flex-wrap: wrap; }
	.so-folder-row { flex: 0 0 auto; }
	.so-acct { flex-wrap: wrap; }
	.so-acct-acts { max-width: 100%; justify-content: flex-start; }
}
@media (max-width: 640px) {
	.so-setrow { grid-template-columns: 1fr; }
	.so-setctl { justify-content: flex-start; }
	.so-msg { max-width: 92%; }
	.so-ext-chip, .so-note-chip { padding: 0; width: 9px; height: 9px; border-radius: 50%; overflow: hidden; }
	.so-ext-chip > *, .so-note-chip > * { display: none; }
	.so-note-chip { background: #E3B300; }
	.so-ext-chip { border-width: 2px; }
	.so-agenda-extras .so-ext-chip, .so-agenda-extras .so-note-chip { width: auto; height: auto; border-radius: 7px; padding: 8px 10px; }
	.so-agenda-extras .so-ext-chip > *, .so-agenda-extras .so-note-chip > * { display: revert; }
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .so-note-chip:not([class*="is-"]) { background: #3A3110; color: #F2D675; }
}
:root[data-theme="dark"] .so-note-chip:not([class*="is-"]) { background: #3A3110; color: #F2D675; }

/* Inline link icons in Social account rows */
.so-acct-main a .p-i { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-left: 3px; }

/* Social — connect accounts (v0.8) */
.sc-filters { flex-wrap: wrap; gap: 8px; }
.sc-filters .p-input { flex: 0 1 auto; }
.sc-filters input[type=search] { flex: 1 1 220px; }
.sc-summary { margin: -4px 0 12px; }
.sc-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.sc-gchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--violet-soft); color: var(--violet-ink); font-size: 12px; font-weight: 600; }
.sc-gchip .p-i { width: 12px; height: 12px; }
.sc-netgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sc-net { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.sc-net:hover { border-color: var(--violet-hi); }
.sc-net.is-sel { border-color: var(--violet); box-shadow: 0 0 0 2px var(--violet-soft); }
.sc-net.is-off .so-plat { opacity: .55; }
.sc-net .so-plat { min-width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
.sc-net-t { display: flex; flex-direction: column; min-width: 0; }
.sc-net-t b { font-size: 14px; }
.sc-netdetail { margin-top: 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--muted-soft); }
.sc-netdetail p { margin: 0 0 8px; }
.sc-scopes { margin: 0 0 8px; padding-left: 18px; }
.sc-pick { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.sc-pickrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.sc-pickrow:first-child { border-top: 0; }
.sc-pickrow.is-off { background: var(--muted-soft); }
.sc-pickmain { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; cursor: pointer; }
.sc-pickrow.is-off .sc-pickmain { cursor: default; }
.sc-pickmain input { width: 18px; height: 18px; flex: 0 0 auto; }
.sc-pickname { display: flex; flex-direction: column; min-width: 0; }
.sc-pickname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-pickmeta { display: block; }
.sc-pickwhy { flex: 1 1 100%; margin: 0; color: var(--mute); }
.sc-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--muted-soft); }
.sc-results { list-style: none; margin: 0; padding: 0; }
.sc-results li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.sc-results li:first-child { border-top: 0; }
.sc-res-t { flex: 1; min-width: 0; }
.so-tt-note { margin: 0; }
@media (max-width: 640px) {
	.sc-netgrid { grid-template-columns: 1fr 1fr; }
	.sc-net { padding: 8px; }
	.sc-filters .p-input { flex: 1 1 45%; }
}
.so-connectors li > div:first-child { flex: 1 1 auto; min-width: 0; }
.so-connectors li > .p-badge { flex: 0 0 auto; }
.sc-grouplist li { flex-wrap: wrap; }
.sc-grouplist .p-row { flex-wrap: wrap; gap: 6px; }
.sc-scopes-d { margin: 0 0 8px; } .sc-scopes-d summary { cursor: pointer; font-weight: 600; }
.sc-addrow { width: 100%; justify-content: center; margin-top: 8px; border-style: dashed; }
.sc-addrow { white-space: normal; height: auto; min-height: 40px; text-align: center; max-width: 100%; }
.so-subnav-wrap { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 20px; }
.so-subnav-wrap .so-subnav { flex: 1 1 auto; min-width: 0; margin: 0; }
.so-jump { flex: 0 0 auto; width: auto; min-width: 150px; font-weight: 600; }
@media (max-width: 640px) { .so-subnav-wrap { flex-direction: column; align-items: stretch; } .so-jump { width: 100%; } }
@media (min-width: 641px) { .so-jump { width: 170px; max-width: 170px; align-self: center; } }

/* Sidebar dropdowns */
.p-nav-row { display: flex; align-items: center; gap: 2px; }
.p-nav-row .p-nav-link { flex: 1 1 auto; min-width: 0; }
.p-nav-toggle { flex: 0 0 auto; width: 32px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #BDB7CC; cursor: pointer; }
.p-nav-toggle:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.p-nav-toggle .p-i { width: 16px; height: 16px; transition: transform .15s var(--ease); }
.p-nav-group.is-open .p-nav-toggle .p-i { transform: rotate(90deg); }
.p-nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .1); }
.p-nav-group.is-open .p-nav-sub { display: flex; }
.p-nav-sublink { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: #A9A3B8; text-decoration: none; font-size: 13.5px; }
.p-nav-sublink:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.p-nav-sublink.is-active { color: #fff; background: rgba(122, 87, 255, .16); }
.p-nav-sublink.is-action { color: #C9BBFF; font-weight: 600; }
.p-nav-sublink .p-i { width: 14px; height: 14px; }
.p-side { overflow-y: auto; scrollbar-width: thin; }
button.p-nav-sublink { border: 0; background: transparent; font: inherit; font-size: 13.5px; text-align: left; width: 100%; cursor: pointer; }
