/* Fonts (Poppins for headings, Inter for text, labels and controls) are loaded by <link> tags in the
   HTML <head>, with display=swap: text shows immediately in the fallback fonts below, then swaps in. */

/* =========================================================================
   Just-Jame Project OS — team interface
   Tokens first, then layout (sidebar + main), shared components, each page,
   and finally the client portal (kept visually the same for clients).
   ========================================================================= */

html, body { margin: 0; padding: 0; background: #f4f3f0; }

.jjs-root {
  --ink: #16161a;
  --paper: #f4f3f0;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-border: #e5e2dc;
  --line: rgba(22,22,26,0.10);
  --muted: #5d5d66;
  --faint: #8a8a93;
  --white: #ffffff;
  --black: #0d0d10;
  --accent: #c1440e;
  --accent-ink: #a13a0c;
  --accent-soft: rgba(193,68,14,0.09);
  --good: #1d7a46;
  --good-soft: #e3f3e9;
  --warn: #8f5200;
  --warn-soft: #fdf1e1;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.08);
  --font-display: 'Poppins', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  position: relative;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.jjs-root * { box-sizing: border-box; }
.jjs-root [hidden] { display: none !important; }
.jjs-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jjs-root button { font-family: inherit; }
.jjs-root h1, .jjs-root h2, .jjs-root h3 { margin: 0; font-weight: 400; }

.jjs-ico { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; }

/* ---------- layout ---------- */
.jjs-shell { display: flex; min-height: 100vh; }
.jjs-main { flex: 1; min-width: 0; }
.jjs-main-inner { max-width: 1240px; margin: 0 auto; padding: 28px 32px 64px; }
.jjs-page { display: flex; flex-direction: column; gap: 18px; }
.jjs-stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- sidebar ---------- */
.jjs-side {
  width: 256px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--panel-border);
  padding: 20px 14px 16px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
}
.jjs-brand { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 6px; }
.jjs-word { font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; line-height: 1; }
.jjs-sub { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; letter-spacing: 0.3px; }
.jjs-side .jjs-side-close { display: none; }

.jjs-nav { display: flex; flex-direction: column; gap: 2px; }
.jjs-navitem {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  border: none; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background 0.12s ease;
}
.jjs-navitem .jjs-ico { color: var(--muted); }
.jjs-navitem span:first-of-type { flex: 1; }
.jjs-navitem:hover { background: rgba(22,22,26,0.05); }
.jjs-navitem.on { background: var(--black); color: var(--white); }
.jjs-navitem.on .jjs-ico { color: var(--white); }
.jjs-navbadge { font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 20px; text-align: right; }
.jjs-navbadge.hot { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; min-width: 0; }
.jjs-navitem.on .jjs-navbadge { color: rgba(255,255,255,0.8); }
.jjs-navitem.on .jjs-navbadge.hot { color: #fff; }

.jjs-side-section { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.jjs-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--panel-border); background: var(--surface); color: var(--ink); cursor: pointer; }
.jjs-iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.jjs-iconbtn.sm { width: 26px; height: 26px; border-radius: 7px; }
.jjs-iconbtn.sm .jjs-ico { width: 14px; height: 14px; }

.jjs-clientlist { display: flex; flex-direction: column; gap: 1px; }
.jjs-clientbtn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border-radius: 9px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; transition: background 0.12s ease; }
.jjs-clientbtn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jjs-clientbtn:hover { background: rgba(22,22,26,0.05); }
.jjs-clientbtn.active { background: var(--accent-soft); color: var(--accent-ink); }
.jjs-clientbtn .cnt { font-size: 12px; font-weight: 600; color: var(--faint); }
.jjs-clientbtn[draggable="true"] { cursor: pointer; }
.jjs-clientbtn.dragging { opacity: 0.4; }
.jjs-clientbtn.drag-over-top { box-shadow: inset 0 2px 0 var(--accent); }
.jjs-clientbtn.drag-over-bottom { box-shadow: inset 0 -2px 0 var(--accent); }
.jjs-projmatch { flex-direction: column; align-items: flex-start; gap: 0; }
.jjs-projmatch small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.jjs-searchgroup-label { font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); padding: 8px 10px 2px; }
.jjs-side-empty { font-size: 13px; color: var(--muted); padding: 6px 10px; line-height: 1.5; }
.jjs-unreaddot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.jjs-sidefoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.jjs-sidefoot .jjs-navitem { font-size: 13.5px; }

.jjs-syncbadge { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; letter-spacing: 0.2px; color: var(--muted); padding: 8px 10px 0; }
.jjs-syncbadge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.jjs-syncbadge.saved, .jjs-syncbadge.saved .dot { color: var(--good); }
.jjs-syncbadge.saved .dot { background: var(--good); }
.jjs-syncbadge.saving { color: var(--accent); }
.jjs-syncbadge.saving .dot { background: var(--accent); animation: jjs-pulse 1s ease-in-out infinite; }
.jjs-syncbadge.error { color: var(--bad); }
.jjs-syncbadge.error .dot { background: var(--bad); }
.jjs-syncbadge.offline .dot { background: #999; }
@keyframes jjs-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.jjs-mobilebar { display: none; }
.jjs-scrim { display: none; }

/* ---------- inputs ---------- */
.jjs-searchbox { position: relative; }
.jjs-searchbox input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--ink); transition: border-color 0.12s ease; }
.jjs-searchbox input:hover { border-color: #c9c5bd; }
.jjs-searchbox input:focus { border-color: var(--accent); outline: none; }
.jjs-searchbox input::placeholder { color: var(--faint); }
.jjs-searchbox.grow { flex: 1; min-width: 220px; }
.jjs-side .jjs-searchbox input { background: var(--paper); }

.jjs-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.jjs-toolbar select { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--ink); cursor: pointer; }
.jjs-result-count { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; gap: 10px; align-items: center; margin: -6px 0 0; }

/* ---------- buttons ---------- */
.jjs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--black); background: var(--black); color: var(--white); padding: 10px 16px; border-radius: 9px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: 0.1px; text-decoration: none; white-space: nowrap; transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.jjs-btn:hover { background: #2a2a30; border-color: #2a2a30; }
.jjs-btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--panel-border); }
.jjs-btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.jjs-btn.sm { padding: 7px 12px; font-size: 13px; }
.jjs-btn.danger { background: var(--surface); color: var(--bad); border-color: rgba(180,35,24,0.3); }
.jjs-btn.danger:hover { background: var(--bad-soft); }
.jjs-linktext { background: none; border: none; padding: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.jjs-linktext:hover { text-decoration: underline; }
.jjs-linktext.inline { padding: 0; }

/* "More" menu */
.jjs-menu { position: relative; }
.jjs-menu > summary { list-style: none; }
.jjs-menu > summary::-webkit-details-marker { display: none; }
.jjs-menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--panel-border); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.14); padding: 5px; z-index: 40; display: flex; flex-direction: column; }
.jjs-menu-list button { text-align: left; background: none; border: none; padding: 9px 11px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.jjs-menu-list button:hover { background: rgba(22,22,26,0.05); }
.jjs-menu-list button.danger { color: var(--bad); }
.jjs-menu-list button.danger:hover { background: var(--bad-soft); }

/* Segmented control (view switches, filters) */
.jjs-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: rgba(22,22,26,0.06); border-radius: 10px; align-self: flex-start; }
.jjs-seg button { border: none; background: transparent; padding: 7px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.jjs-seg button:hover { color: var(--ink); }
.jjs-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.jjs-seg-count { font-size: 11.5px; font-weight: 600; color: var(--faint); }
.jjs-seg button.on .jjs-seg-count { color: var(--muted); }

.jjs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jjs-chip { border: 1px solid var(--panel-border); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.jjs-chip:hover { border-color: var(--accent); color: var(--ink); }
.jjs-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- page header ---------- */
.jjs-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.jjs-pagehead-text { min-width: 0; }
.jjs-pagehead-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jjs-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.jjs-eyebrow-link { background: none; border: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
.jjs-eyebrow-link:hover { text-decoration: underline; }
.jjs-title { font-family: var(--font-display); font-size: 36px; letter-spacing: 0.8px; line-height: 1.05; }
.jjs-title-meta { font-size: 14px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jjs-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: none; padding: 0; align-self: flex-start; }
.jjs-back:hover { color: var(--accent); }

/* ---------- sections, empty & quiet states ---------- */
.jjs-section { background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.jjs-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.jjs-section-head:only-child { margin-bottom: 0; }
.jjs-section-title { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.6px; line-height: 1.1; }
.jjs-section-desc { font-size: 13px; color: var(--muted); margin-top: 3px; max-width: 70ch; }
.jjs-section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jjs-section.empty { box-shadow: none; background: rgba(255,255,255,0.6); }
.jjs-subhead { font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }

.jjs-quiet { font-size: 14px; color: var(--muted); line-height: 1.6; }
.jjs-emptystate { text-align: center; padding: 48px 24px; background: var(--surface); border: 1px dashed #d6d2ca; border-radius: var(--radius); }
.jjs-emptystate-title { font-weight: 600; font-size: 16px; }
.jjs-emptystate-body { font-size: 14px; color: var(--muted); margin: 6px auto 0; max-width: 56ch; line-height: 1.6; }
.jjs-emptystate-action { margin-top: 16px; }
.jjs-empty { padding: 32px 20px; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.jjs-inline-alert { background: var(--bad-soft); color: var(--bad); border: 1px solid #f3c0b9; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; margin: 12px 0; }
.jjs-inline-alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f0d8b8; }
.jjs-main > .jjs-inline-alert { margin: 16px 32px 0; }
.jjs-pointer { font-size: 13.5px; color: var(--muted); padding: 12px 16px; border-radius: 10px; background: rgba(22,22,26,0.04); }
.jjs-help { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; line-height: 1.5; }

.jjs-newtag { display: inline-block; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: 0.3px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; white-space: nowrap; }

.jjs-loading { display: flex; align-items: center; gap: 10px; }
.jjs-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: jjs-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes jjs-spin { to { transform: rotate(360deg); } }

/* ---------- pills (stage colors) ---------- */
.jjs-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; letter-spacing: 0.1px; }
.jjs-pill.tiny { font-size: 10.5px; padding: 2px 8px; width: fit-content; }
.st-onboarding { background: #ececec; color: #444; }
.st-planning { background: #efe6d8; color: #6a5a35; }
.st-pre { background: #fde8cf; color: #7a4d08; }
.st-pitching { background: #e4e0ff; color: #423699; }
.st-production { background: #d9f0e2; color: #196b3c; }
.st-postproduction { background: #d6ecf2; color: #0e5a6e; }
.st-approval { background: #fbe4c4; color: #8a4b06; }
.st-delivery { background: #dce6fb; color: #2b4ea3; }
.st-locked { background: var(--black); color: var(--white); }
.st-completed { background: #16161a; color: #fff; }
.st-cancelled { background: #e3b3b3; color: #5c1010; }
.st-hold { background: #f6d6d6; color: #a33; }

/* ---------- HOME ---------- */
.jjs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.jjs-tile { text-align: left; background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.jjs-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.jjs-tile b { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; }
.jjs-tile-label { font-size: 13.5px; font-weight: 600; }
.jjs-tile-sub { font-size: 12px; color: var(--muted); }
.jjs-tile.hot { border-color: rgba(193,68,14,0.4); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); }
.jjs-tile.hot b { color: var(--accent); }
.jjs-tile.warn b { color: var(--warn); }
.jjs-home-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.jjs-rowlist { display: flex; flex-direction: column; gap: 6px; }
.jjs-attn-row { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; background: var(--warn-soft); border: 1px solid #f0d8b8; font-size: 13.5px; cursor: pointer; color: var(--ink); }
.jjs-attn-row:hover { border-color: var(--accent); }
.jjs-attn-proj { font-weight: 600; min-width: 0; flex: 0 0 38%; display: flex; flex-direction: column; }
.jjs-attn-proj small { font-weight: 500; color: var(--muted); font-size: 12px; }
.jjs-attn-msg { flex: 1; min-width: 0; }

.jjs-stagechips { display: flex; flex-wrap: wrap; gap: 8px; }
.jjs-stagechip-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--panel-border); background: var(--surface); cursor: pointer; font-size: 13px; }
.jjs-stagechip-btn:hover { border-color: var(--accent); }
.jjs-stagechip-btn b { font-weight: 600; }

.jjs-eventrow { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--panel-border); background: var(--surface); cursor: pointer; color: var(--ink); }
.jjs-eventrow:hover { border-color: var(--accent); }
.jjs-eventrow.unread { background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--surface); border-color: rgba(193,68,14,0.3); }
.jjs-eventrow.compact { padding: 9px 11px; }
.jjs-eventrow-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.jjs-eventrow-icon.approve { background: var(--good); }
.jjs-eventrow-icon.changes { background: var(--accent); }
.jjs-eventrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jjs-eventrow-note { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.jjs-eventrow.compact .jjs-eventrow-note { font-size: 13.5px; }
.jjs-eventrow-meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.jjs-inboxlist { max-width: 860px; }

.jjs-daterow { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: var(--surface); cursor: pointer; color: var(--ink); }
.jjs-daterow:hover { border-color: var(--accent); }
.jjs-daterow-when { flex: 0 0 96px; font-weight: 600; font-size: 13.5px; display: flex; flex-direction: column; }
.jjs-daterow-when.soon { color: var(--accent); }
.jjs-daterow-when small, .jjs-daterow-what small { font-weight: 500; font-size: 12px; color: var(--muted); }
.jjs-daterow-what { display: flex; flex-direction: column; font-weight: 600; font-size: 13.5px; min-width: 0; }

/* ---------- ALL PROJECTS table ---------- */
.jjs-mastertable { border-collapse: collapse; font-size: 14px; width: 100%; }
.jjs-mastertable th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.3px; padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: relative; background: #faf9f7; }
.jjs-mastertable td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow: hidden; }
.jjs-mastertable tbody tr:last-child td { border-bottom: none; }
.jjs-mastertable tr.mrow { cursor: pointer; }
.jjs-mastertable tr.mrow td { padding: 12px 10px; }
.jjs-mastertable tr.mrow:hover td, .jjs-mastertable tr.mrow:focus td { background: rgba(193,68,14,0.05); }
.jjs-mastertable .mname { font-weight: 600; }
.jjs-mastertable .mmuted, .mmuted { color: var(--muted); font-size: 13px; }
.jjs-master-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--panel-border); background: var(--surface); }
.jjs-section .jjs-master-wrap { border-radius: 10px; }
.jjs-col-resizer { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 2; }
.jjs-col-resizer:hover, .jjs-col-resizer.active { background: rgba(193,68,14,0.25); }
.jjs-minibar { height: 6px; border-radius: 999px; background: rgba(22,22,26,0.08); overflow: hidden; max-width: 110px; }
.jjs-minibar i { display: block; height: 100%; background: var(--ink); }

.jjs-editable-table input, .jjs-editable-table select {
  border: 1px solid transparent; background: transparent; font-family: inherit; font-size: 13.5px; color: var(--ink);
  padding: 6px 7px; border-radius: 6px; width: 100%; box-sizing: border-box;
}
.jjs-editable-table input:hover, .jjs-editable-table select:hover { background: rgba(22,22,26,0.05); }
.jjs-editable-table input:focus, .jjs-editable-table select:focus { outline: none; border-color: var(--accent); background: #fff; }
.jjs-editable-table tr:hover td { background: rgba(22,22,26,0.02); }
.jjs-editable-table tr.jjs-highlight td { background: #fff4d6; animation: jjs-flash 2.4s ease; }
@keyframes jjs-flash { 0% { background: #ffe39a; } 100% { background: #fff4d6; } }
.jjs-urlcell { display: flex; align-items: center; gap: 2px; }
.jjs-urlcell input { flex: 1; min-width: 0; }
.jjs-openlink { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--accent); flex-shrink: 0; }
.jjs-openlink:hover { background: var(--accent-soft); }
.jjs-vdel { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 18px; line-height: 1; padding: 3px 6px; border-radius: 6px; }
.jjs-vdel:hover { color: var(--bad); background: var(--bad-soft); }
.jjs-feedbackbtn { margin: 3px 0 2px 6px; border: 1px solid var(--panel-border); background: #fff; border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.jjs-feedbackbtn:hover { border-color: var(--accent); color: var(--accent); }
.jjs-feedbackbtn.unread { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Timeline (gantt) ---------- */
.jjs-gantt-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.jjs-gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.jjs-gantt-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.jjs-gantt { border: 1px solid var(--panel-border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.jjs-gantt-scroll { overflow-x: auto; }
.jjs-gantt-inner { min-width: 760px; }
.jjs-gantt-header { display: flex; border-bottom: 1px solid var(--line); background: #faf9f7; }
.jjs-gantt-row-label { width: 240px; flex-shrink: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; justify-content: center; border-right: 1px solid var(--panel-border); }
.jjs-gantt-track { position: relative; flex: 1; min-height: 50px; }
.jjs-gantt-header .jjs-gantt-track { min-height: 32px; }
.jjs-gantt-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed rgba(22,22,26,0.14); padding-left: 6px; padding-top: 8px; }
.jjs-gantt-tick span { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.jjs-gantt-todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: #d92b2b; z-index: 3; }
.jjs-gantt-group { padding: 10px 14px 5px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); background: rgba(22,22,26,0.025); border-top: 1px solid var(--panel-border); }
.jjs-gantt-header + .jjs-gantt-group { border-top: none; }
.jjs-gantt-row { display: flex; border-top: 1px solid var(--panel-border); cursor: pointer; transition: background 0.12s ease; }
.jjs-gantt-row:hover { background: rgba(193,68,14,0.05); }
.jjs-gantt-pname { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.jjs-gantt-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 24px; border-radius: 7px; display: flex; align-items: center; padding: 0 10px; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.18); }
.jjs-gantt-bar:hover { filter: brightness(0.94); }
.jjs-gantt-bar span { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jjs-gantt-nodate { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); font-size: 12.5px; color: var(--muted); font-style: italic; }
.jjs-gantt-milestone { position: absolute; top: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%) rotate(45deg); border-radius: 2px; z-index: 4; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.jjs-gantt-milestone.shoot { background: #4c3fb0; }
.jjs-gantt-milestone.locked { background: var(--ink); }

/* ---------- CLIENT PAGE: project cards ---------- */
.jjs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.jjs-card { position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--panel-border); border-radius: 14px; padding: 18px; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.12s ease; }
.jjs-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: rgba(193,68,14,0.35); }
.jjs-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.jjs-card-name { font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.jjs-card-date { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.jjs-card-foot { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 500; border-top: 1px solid var(--line); padding-top: 10px; }
.jjs-card-wait { color: var(--accent); }
.jjs-card-flag { position: absolute; top: -9px; right: 14px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(193,68,14,0.35); }
.jjs-card-add { align-items: center; justify-content: center; flex-direction: row; gap: 8px; min-height: 150px; border-style: dashed; background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; }
.jjs-card-add:hover { color: var(--accent); background: var(--surface); }

/* ---------- PROJECT PAGE ---------- */
.jjs-summary { display: flex; flex-wrap: wrap; gap: 0; background: var(--surface); border: 1px solid var(--panel-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.jjs-summary-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 18px; border-right: 1px solid var(--line); min-width: 0; }
.jjs-summary-item:last-child { border-right: none; }
.jjs-summary-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.jjs-summary-value { font-size: 14px; font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.jjs-summary-links { margin-left: auto; }
.jjs-stage-select { font-family: inherit; font-size: 14px; font-weight: 600; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--panel-border); background: var(--paper); color: var(--ink); cursor: pointer; }
.jjs-stage-select:hover { border-color: var(--accent); }
.jjs-quicklink { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 3px 8px; border-radius: 7px; background: var(--accent-soft); }
.jjs-quicklink:hover { background: rgba(193,68,14,0.16); }
.jjs-quicklink .jjs-ico { width: 13px; height: 13px; }
.jjs-quicklink.empty { color: var(--faint); background: transparent; border: 1px dashed var(--panel-border); font-weight: 600; }

.jjs-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.jjs-tabs::-webkit-scrollbar { display: none; }
.jjs-tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--muted); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.jjs-tab:hover { color: var(--ink); }
.jjs-tab.on { color: var(--ink); font-weight: 600; border-color: var(--accent); }
.jjs-tabcount { font-size: 11px; font-weight: 500; color: var(--muted); background: rgba(22,22,26,0.07); border-radius: 999px; padding: 1px 7px; }
.jjs-tabcount.hot { background: var(--accent); color: #fff; }
.jjs-tabbody { padding-top: 4px; }

/* Overview */
.jjs-glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.jjs-glance-card { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--panel-border); background: var(--surface); cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.jjs-glance-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.jjs-glance-title { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.jjs-glance-card b { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.jjs-glance-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.jjs-glance-card.hot { border-color: rgba(193,68,14,0.4); }
.jjs-glance-card.hot b { color: var(--accent); }
.jjs-glance-card.warn b { color: var(--bad); }
.jjs-expect-text { font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.jjs-datebar { margin-top: 18px; }

/* Stage stepper (clickable on the team side, read-only mini version on the client side) */
.jjs-stepper { display: flex; margin: 4px 0 6px; flex-wrap: wrap; }
.jjs-step { flex: 1; min-width: 74px; text-align: center; position: relative; padding: 16px 2px 4px; background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
.jjs-step:hover .dot { border-color: var(--accent); }
.jjs-step::before { content: ""; position: absolute; top: 21px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; border-radius: 2px; }
.jjs-step:first-child::before { display: none; }
.jjs-step.done::before, .jjs-step.now::before { background: var(--ink); }
.jjs-step .dot { display: block; width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 3px solid #d3d0ca; margin: 0 auto 7px; position: relative; z-index: 1; }
.jjs-step.done .dot { background: var(--ink); border-color: var(--ink); }
.jjs-step.now .dot { background: #d92b2b; border-color: #d92b2b; box-shadow: 0 0 0 5px rgba(217,43,43,0.15); }
.jjs-step-label, .jjs-step > span:not(.dot) { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.1px; line-height: 1.3; }
.jjs-step.done .jjs-step-label, .jjs-step.now .jjs-step-label, .jjs-step.done > span:not(.dot), .jjs-step.now > span:not(.dot) { color: var(--ink); font-weight: 600; }
.jjs-stepper-mini { margin: 4px 0 16px; }
.jjs-stepper-mini .jjs-step { cursor: default; min-width: 56px; pointer-events: none; padding-top: 16px; }
.jjs-stepper-mini .jjs-step::before { top: 5px; }
.jjs-stepper-mini .jjs-step .dot { margin-top: -16px; }
.jjs-stepper-mini .jjs-step span { font-size: 10.5px; }

.jjs-phasebar { position: relative; height: 34px; border-radius: 10px; background: #f1efeb; border: 1px solid var(--panel-border); overflow: visible; margin: 22px 0 4px; }
.jjs-phasebar-clip { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; }
.jjs-phasefill { position: absolute; top:0; bottom:0; left:0; background: linear-gradient(90deg, #2b2b2b, var(--ink)); }
.jjs-today { position: absolute; top: -6px; bottom: -6px; width: 2px; background: #d92b2b; z-index: 5; }
.jjs-today::after { content: "TODAY"; position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: #d92b2b; letter-spacing: 0.5px; white-space: nowrap; }
.jjs-milestone { position: absolute; top: 50%; width: 13px; height: 13px; transform: translate(-50%, -50%) rotate(45deg); border-radius: 3px; z-index: 4; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.jjs-milestone.shoot { background: #4c3fb0; }
.jjs-milestone.locked { background: var(--ink); }
.jjs-timeline-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 10px; }
.jjs-timeline-legend { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.jjs-timeline-legend b { color: var(--ink); }
.jjs-timeline-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); margin-right: 6px; vertical-align: middle; position: relative; top: -1px; }

.jjs-stagechip { width: 100%; }
.jjs-stagechip-track { width: 100%; height: 6px; border-radius: 999px; background: rgba(22,22,26,0.08); overflow: hidden; }
.jjs-stagechip-fill { height: 100%; background: var(--ink); border-radius: 999px; transition: width 0.2s ease; }
.jjs-stagechip-label { margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }

/* Decks & files */
.jjs-phase .jjs-section-head { margin-bottom: 10px; }
.jjs-revisionwarn { margin: 0 0 10px; font-size: 13px; font-weight: 600; line-height: 1.45; padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); color: #8a1f11; border: 1px solid #f3b6ad; }
.jjs-revisionwarn.client { font-weight: 500; margin-top: 12px; }
.jjs-phase .jjs-result-count { margin-top: 8px; }

/* Client feedback tab */
.jjs-waitrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: #fcfbf9; }
.jjs-waitrow-main { display: flex; flex-direction: column; min-width: 0; }
.jjs-waitrow-title { font-weight: 600; font-size: 14px; }
.jjs-waitrow-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.jjs-waitrow-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.jjs-fbcard { border: 1px solid var(--panel-border); border-radius: 12px; padding: 14px 16px; margin-top: 10px; background: #fcfbf9; }
.jjs-fbcard:first-of-type { margin-top: 0; }
.jjs-fbcard.unread { border-color: rgba(193,68,14,0.45); background: #fffaf6; box-shadow: inset 3px 0 0 var(--accent); }
.jjs-fbcard.jjs-highlight { outline: 2px solid #f0b400; outline-offset: 2px; }
.jjs-fbcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.jjs-fbcard-title { font-weight: 600; font-size: 15px; }
.jjs-fbcard-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.jjs-fbcard-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.jjs-feedthread { display: flex; flex-direction: column; gap: 8px; }
.jjs-modal .jjs-feedthread { max-height: 55vh; overflow-y: auto; margin-bottom: 4px; }
.jjs-feedbubble { border-radius: 10px; padding: 9px 12px; font-size: 13.5px; line-height: 1.55; max-width: 720px; }
.jjs-feedbubble.client { background: var(--accent-soft); border: 1px solid rgba(193,68,14,0.2); }
.jjs-feedbubble.team { background: rgba(22,22,26,0.045); border: 1px solid var(--panel-border); margin-left: 24px; }
.jjs-feedbubble-meta { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); margin-bottom: 3px; }
.jjs-feedbubble-text { white-space: pre-wrap; color: var(--ink); overflow-wrap: anywhere; }

/* Activity feed */
.jjs-feed { position: relative; }
.jjs-feed-item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.jjs-feed-item:last-child { padding-bottom: 0; }
.jjs-feed-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.jjs-feed-item:last-child::before { display: none; }
.jjs-feed-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 12px; flex-shrink: 0; background: var(--muted); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); z-index: 1; }
.jjs-feed-item.ext .jjs-feed-dot { background: var(--accent); box-shadow: 0 0 0 1px rgba(193,68,14,0.3); }
.jjs-feed-body { flex: 1; min-width: 0; background: #fcfbf9; border: 1px solid var(--panel-border); border-radius: 10px; padding: 9px 12px; }
.jjs-feed-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.jjs-feed-date-input { font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); border: 1px solid var(--panel-border); border-radius: 6px; padding: 3px 6px; background: #fff; }
.jjs-feed-tag-select { font-family: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; border: none; border-radius: 999px; padding: 4px 10px; cursor: pointer; background: #ececec; color: #444; }
.jjs-feed-item.ext .jjs-feed-tag-select { background: var(--accent-soft); color: var(--accent); }
.jjs-feed-note-input { width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; font-family: inherit; font-size: 14px; color: var(--ink); padding: 4px 6px; margin-left: -6px; }
.jjs-feed-note-input:hover { background: rgba(22,22,26,0.04); }
.jjs-feed-note-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.jjs-feed-item .jjs-vdel { margin-left: auto; }

/* Deliverables */
.jjs-delivlist { display: flex; flex-direction: column; gap: 8px; }
.jjs-delivrow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: #fcfbf9; border: 1px solid var(--panel-border); flex-wrap: wrap; }
.jjs-delivname { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 130px; }
.jjs-delivrow select { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 13px; background: #fff; cursor: pointer; }
.jjs-delivlink { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.jjs-delivlink:hover { text-decoration: underline; }

/* Notes */
.jjs-linklib { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.jjs-noterow { padding: 12px 14px; border-radius: 10px; background: #fcfbf9; border: 1px solid var(--panel-border); margin-top: 8px; position: relative; }
.jjs-noterow:first-of-type { margin-top: 0; }
.jjs-noterow-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding-right: 26px; }
.jjs-noterow .jjs-vdel { position: absolute; top: 8px; right: 8px; }
.jjs-notedate { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.jjs-notetopic { font-weight: 600; font-size: 14px; }
.jjs-noteinfo { font-size: 14px; margin-top: 6px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- forms & modals ---------- */
.jjs-modal-bg { position: fixed; inset: 0; background: rgba(10,10,12,0.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.jjs-modal { background: #fff; border-radius: 16px; padding: 24px 26px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.25); }
.jjs-modal.wide { max-width: 620px; }
.jjs-modal h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin: 0 0 16px; letter-spacing: 0.6px; }
.jjs-field { margin-bottom: 14px; min-width: 0; }
.jjs-field label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 5px; letter-spacing: 0.1px; }
.jjs-field input, .jjs-field select, .jjs-field textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 14.5px; background: #fafafa; color: var(--ink); transition: border-color 0.12s ease, background 0.12s ease; }
.jjs-field input:focus, .jjs-field select:focus, .jjs-field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.jjs-field textarea { resize: vertical; min-height: 80px; }
.jjs-modal-actions { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }
.jjs-form-error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.jjs-checkrow { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--muted); cursor: pointer; padding: 10px 12px; border-radius: 10px; background: rgba(22,22,26,0.035); }
.jjs-checkrow b { color: var(--ink); }
.jjs-checkrow input { margin-top: 3px; width: auto; flex-shrink: 0; }
.jjs-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jjs-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.jjs-datablock { padding: 14px 0; border-top: 1px solid var(--line); }
.jjs-datablock:first-of-type { border-top: none; padding-top: 0; }
.jjs-datablock .jjs-syncbadge { padding: 0 0 6px; }
.jjs-datablock .jjs-subhead { margin-top: 0; }
.jjs-datablock .jjs-help { margin: 0 0 10px; }
.jjs-btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

.jjs-connect-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.jjs-connect-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--panel-border); border-radius: 16px; padding: 30px 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.08); }
.jjs-connect-card h3 { font-weight: 600; font-size: 18px; }
.jjs-connect-error { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bad-soft); border: 1px solid #f0baba; color: var(--bad); font-size: 13px; font-weight: 600; line-height: 1.5; }

.jjs-conflict-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--warn-soft); border-bottom: 1px solid #f0d8b8; padding: 12px 32px; font-size: 13.5px; line-height: 1.6; position: sticky; top: 0; z-index: 20; }
.jjs-conflict-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- toasts ---------- */
.jjs-toaststack { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column-reverse; gap: 10px; width: 340px; max-width: calc(100vw - 36px); }
.jjs-toast { display: flex; gap: 10px; align-items: flex-start; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.22); cursor: pointer; border-left: 4px solid var(--ink); animation: jjsToastIn 0.2s ease; }
.jjs-toast.approve { border-left-color: var(--good); }
.jjs-toast.changes { border-left-color: var(--accent); }
.jjs-toast-icon { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--black); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.jjs-toast.approve .jjs-toast-icon { background: var(--good); }
.jjs-toast.changes .jjs-toast-icon { background: var(--accent); }
.jjs-toast-body { flex: 1; min-width: 0; }
.jjs-toast-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.jjs-toast-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; overflow-wrap: break-word; }
.jjs-toast-close { flex-shrink: 0; background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px; }
.jjs-toast-close:hover { color: var(--ink); }
@keyframes jjsToastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* =========================================================================
   CLIENT PORTAL (the page clients open from their link) + team preview of it
   ========================================================================= */
.jjs-linkcol-title { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.6px; }
.jjs-expect { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: #fcfbf9; border: 1px solid var(--panel-border); font-size: 14.5px; line-height: 1.6; }
.jjs-expect b { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.jjs-clientpreview { max-width: 820px; }
.jjs-clientpreview > .jjs-title { font-size: 32px; }
.jjs-preview-banner { background: var(--warn-soft); color: var(--ink); border: 1px solid #f0d8b8; padding: 12px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.6; }
.jjs-preview-pick { margin-bottom: 16px; }
.jjs-preview-pick select { padding: 9px 12px; border-radius: 8px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 14px; background: var(--white); min-width: 240px; cursor: pointer; }
.jjs-pv-card { background: var(--surface); border: 1px solid var(--panel-border); border-radius: 14px; padding: 20px 22px; margin-top: 16px; box-shadow: var(--shadow); }
.jjs-pv-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-pv-name { font-weight: 600; font-size: 16px; }
.jjs-preview-sub { font-size: 14.5px; color: var(--muted); margin: 4px 0 16px; line-height: 1.5; }
.jjs-clientpreview > .jjs-back { margin: 14px 0 0; display: block; }

/* Clean, sidebar-free page a client lands on via their own "?client=" link */
.jjs-shell-locked { display: block; }
.jjs-main-locked { max-width: 780px; margin: 0 auto; padding: 36px 20px 60px; }

.jjs-review-col { display: flex; flex-direction: column; gap: 14px; }
.jjs-review-card { background: #fff; border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px 18px; }
.jjs-review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.jjs-review-title { font-weight: 600; font-size: 15px; }
.jjs-review-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.jjs-review-embed { margin-top: 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--panel-border); background: #f2f1ef; position: relative; padding-top: 56.25%; }
.jjs-review-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.jjs-review-openbtn { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.jjs-review-openbtn:hover { background: rgba(193,68,14,0.18); }
.jjs-review-notes { margin-top: 12px; font-size: 13.5px; color: var(--ink); background: rgba(22,22,26,0.04); border-radius: 8px; padding: 10px 12px; line-height: 1.5; white-space: pre-wrap; }
.jjs-review-notes b { font-weight: 600; }
.jjs-review-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.jjs-review-actions .jjs-btn { padding: 12px 20px; font-size: 14.5px; }
.jjs-review-feedback { margin-top: 12px; }
.jjs-review-feedback textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 14px; resize: vertical; min-height: 70px; }
.jjs-review-feedback textarea:focus { outline: none; border-color: var(--accent); }
.jjs-review-approved { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: #196b3c; background: #d9f0e2; border-radius: 8px; padding: 9px 12px; }
.jjs-review-vcount { font-size: 11.5px; font-weight: 500; color: var(--muted); background: rgba(22,22,26,0.06); border-radius: 999px; padding: 2px 8px; margin-left: 4px; vertical-align: middle; }
.jjs-review-history { margin-top: 14px; border-top: 1px dashed var(--panel-border); padding-top: 10px; }
.jjs-review-history-toggle { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }
.jjs-review-history-toggle:hover { text-decoration: underline; }
.jjs-review-history-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.jjs-review-history-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; background: rgba(22,22,26,0.03); border-radius: 8px; padding: 8px 10px; }
.jjs-review-history-row a { color: var(--accent); font-weight: 600; text-decoration: none; }
.jjs-review-history-row a:hover { text-decoration: underline; }
.jjs-review-history-date { font-weight: 500; color: var(--muted); margin-right: 8px; }

.jjs-clientpicker { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 4px; }
.jjs-clientpicker-card { background: #fff; border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px 18px; cursor: pointer; transition: border-color 0.12s ease, transform 0.1s ease; }
.jjs-clientpicker-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.jjs-clientpicker-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.jjs-clientpicker-name { font-weight: 600; font-size: 15px; }
.jjs-clientpicker-flag { margin-top: 12px; font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.jjs-clientpicker-flag.quiet { background: rgba(22,22,26,0.04); color: var(--muted); }

/* ---- v18 client page: home, project header, section tabs ---- */
.jjs-cp-head { display: flex; flex-direction: column; gap: 6px; }
.jjs-cp-head .jjs-title { font-size: 34px; }
.jjs-cp-head .jjs-back { margin-bottom: 6px; }
.jjs-cp-brand { font-family: var(--font-display); font-size: 18px; letter-spacing: 1.2px; color: var(--accent); }
.jjs-clientpreview .jjs-preview-sub { margin: 0; }
.jjs-cp-section { background: var(--surface); border: 1px solid var(--panel-border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.jjs-cp-h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.6px; margin: 0 0 10px !important; }
.jjs-cp-h3 { font-size: 15px; font-weight: 600 !important; margin: 0 0 6px !important; }
.jjs-cp-help { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.55; }
.jjs-cp-attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.jjs-cp-attn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.jjs-cp-attn-row:first-child { border-top: none; padding-top: 2px; }
.jjs-cp-attn-main { min-width: 0; }
.jjs-cp-attn-title { font-weight: 600; font-size: 14.5px; }
.jjs-cp-attn-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
button.jjs-clientpicker-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; }
.jjs-clientpicker-card .jjs-clientpicker-flag { margin-top: 0; }
.jjs-clientpicker-next { font-size: 13px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jjs-clientpicker-next b { color: var(--ink); font-weight: 600; }

.jjs-cp-projhead { margin-top: 0; }
.jjs-cp-projhead .jjs-pv-name { font-size: 20px; margin: 0; font-weight: 600; }
.jjs-cp-stage { margin-top: 12px; max-width: 420px; }
.jjs-cp-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 14px 0 0; }
.jjs-cp-facts dt { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.jjs-cp-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; }
.jjs-cp-newnote { margin-top: 12px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.jjs-cp-tabs { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0; }
.jjs-cp-tab { background: #fff; border: 1px solid var(--panel-border); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.jjs-cp-tab:hover { border-color: var(--accent); color: var(--ink); }
.jjs-cp-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.jjs-cp-tabcount { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(22,22,26,0.08); color: var(--ink); }
.jjs-cp-tabcount.hot { background: var(--accent); color: #fff; }
.jjs-cp-tab.on .jjs-cp-tabcount { background: #fff; color: var(--ink); }
.jjs-cp-body { display: flex; flex-direction: column; gap: 14px; }
.jjs-cp-bar { display: flex; justify-content: flex-end; }

.jjs-review-card.is-new { border-color: rgba(193,68,14,0.45); box-shadow: 0 0 0 3px var(--accent-soft); }
.jjs-review-card.jjs-highlight { outline: 2px solid #f0b400; outline-offset: 2px; }
.jjs-review-card.compact { padding: 14px 16px; }
.jjs-review-card.compact .jjs-review-actions { margin-top: 12px; }
.jjs-review-card.compact .jjs-review-actions .jjs-btn { padding: 8px 14px; font-size: 13.5px; }
.jjs-review-headtext { min-width: 0; }
.jjs-review-kicker { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
h3.jjs-review-title { font-weight: 600; font-size: 16px; margin: 2px 0 0; }
.jjs-btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.jjs-btn.good:hover { background: #17633a; border-color: #17633a; }
.jjs-btn.ghost.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.jjs-btn.xs { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.jjs-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.jjs-cp-panel { margin-top: 12px; border-top: 1px dashed var(--panel-border); padding-top: 10px; }
.jjs-cp-panel + .jjs-cp-panel { margin-top: 8px; }
.jjs-cp-msglist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jjs-cp-msg { background: rgba(22,22,26,0.035); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.jjs-cp-msg.approve { background: #eef8f2; }
.jjs-cp-msg-meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.jjs-cp-msg-meta b { color: var(--ink); }
.jjs-cp-msg-text { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }

/* ---- comment box with attachments ---- */
.jjs-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jjs-composer { margin-top: 14px; border: 1px solid var(--panel-border); border-radius: 12px; padding: 12px; background: #fcfbf9; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.12s ease, background 0.12s ease; }
.jjs-composer.dragging { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.jjs-composer-label { font-size: 13px; font-weight: 600; }
.jjs-composer textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 14px; resize: vertical; min-height: 76px; background: #fff; color: var(--ink); }
.jjs-composer textarea:focus { outline: none; border-color: var(--accent); }
.jjs-composer-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-composer-spacer { flex: 1; }
.jjs-composer-hint { font-size: 12px; color: var(--faint); font-weight: 600; }
.jjs-attachbtn { position: relative; cursor: pointer; }
.jjs-attachbtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.jjs-composer-error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 8px 11px; font-size: 13px; font-weight: 600; }
.jjs-uplist, .jjs-attlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jjs-attlist { margin-top: 8px; }
.jjs-upchip, .jjs-att { background: #fff; border: 1px solid var(--panel-border); border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.jjs-att { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-upchip-row { display: flex; align-items: center; gap: 8px; }
.jjs-att-icon { color: var(--muted); display: inline-flex; }
.jjs-att-name { font-weight: 600; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jjs-att-size { font-size: 12px; color: var(--muted); white-space: nowrap; }
.jjs-att-actions, .jjs-upchip-actions { display: inline-flex; gap: 6px; align-items: center; }
.jjs-upchip-remove { border: none; background: none; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; border-radius: 6px; }
.jjs-upchip-remove:hover { color: var(--bad); background: var(--bad-soft); }
.jjs-upbar { height: 5px; border-radius: 999px; background: rgba(22,22,26,0.08); overflow: hidden; margin-top: 7px; }
.jjs-upbar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.15s ease; }
.jjs-upchip-status { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.jjs-upchip.done .jjs-upchip-status { color: var(--good); }
.jjs-upchip.error { border-color: rgba(180,35,24,0.35); background: var(--bad-soft); }
.jjs-upchip.error .jjs-upchip-status { color: var(--bad); }

/* team side: files the client attached */
.jjs-filegroups { margin-top: 10px; }
.jjs-filegroups .jjs-subhead { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.jjs-filegroup + .jjs-filegroup { margin-top: 10px; }
.jjs-filegroup-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.jjs-feedbubble .jjs-attlist { margin-top: 8px; }
.jjs-clipcount { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.jjs-clipcount .jjs-ico { width: 13px; height: 13px; }
.jjs-feed-body .jjs-attlist { margin-top: 6px; }

/* =========================================================================
   v19 refinements: one quiet type scale and tighter spacing, both views.
     Page title   (see v23)        Section title  (see v23)
     Item name    14–15px / 600    Body           14px / 400
     Meta         12.5px / 500     Label          11px / 600, uppercase
   Bold (600) is kept for names, the active tab/stage, numbers and buttons.
   ========================================================================= */
.jjs-root { font-size: 14px; line-height: 1.5; }
.jjs-root b, .jjs-root strong { font-weight: 600; }

/* layout rhythm */
.jjs-main-inner { padding: 22px 28px 56px; }
.jjs-page { gap: 14px; }
.jjs-stack { gap: 12px; }
.jjs-home-cols { gap: 12px; }

/* page + section headings */
.jjs-title { font-size: 30px; letter-spacing: 0.6px; }
.jjs-title-meta { font-size: 13px; margin-top: 4px; }
.jjs-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.jjs-section { padding: 14px 16px; }
.jjs-section-head { margin-bottom: 10px; align-items: center; }
.jjs-section-title { font-size: 19px; letter-spacing: 0.5px; }
.jjs-subhead { font-size: 11px; letter-spacing: 0.5px; margin: 12px 0 6px; }
.jjs-quiet { font-size: 13.5px; line-height: 1.5; }
.jjs-emptystate { padding: 28px 20px; }
.jjs-emptystate-title { font-size: 15px; }
.jjs-emptystate-body { font-size: 13.5px; line-height: 1.5; }

/* sidebar */
.jjs-side { padding: 18px 12px 14px; gap: 12px; }
.jjs-navitem, .jjs-clientbtn { font-size: 13.5px; font-weight: 500; padding: 8px 10px; }
.jjs-navitem.on { font-weight: 600; }
.jjs-side-section { font-size: 11px; font-weight: 600; }

/* buttons & controls */
.jjs-btn { font-size: 13.5px; padding: 9px 14px; }
.jjs-btn.sm { padding: 6px 11px; font-size: 12.5px; }
.jjs-seg button { font-size: 13px; font-weight: 500; padding: 6px 12px; }
.jjs-seg button.on { font-weight: 600; }
.jjs-chip { font-size: 12px; font-weight: 500; padding: 5px 11px; }
.jjs-tab { font-size: 13.5px; font-weight: 500; padding: 10px 11px; }
.jjs-tab.on { font-weight: 600; }

/* labels and meta */
.jjs-summary-label, .jjs-glance-title, .jjs-cp-facts dt, .jjs-review-kicker, .jjs-feedbubble-meta { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; }
.jjs-eventrow-meta, .jjs-waitrow-meta, .jjs-fbcard-meta, .jjs-review-meta, .jjs-cp-attn-meta, .jjs-card-date, .jjs-card-foot, .jjs-notedate, .jjs-timeline-labels, .jjs-stagechip-label { font-size: 12.5px; font-weight: 500; }

/* Home */
.jjs-tile { padding: 12px 14px; }
.jjs-tile b { font-size: 30px; }
.jjs-tile-label { font-size: 13px; font-weight: 500; }
.jjs-attn-row, .jjs-eventrow, .jjs-daterow { padding: 9px 12px; }
.jjs-attn-proj, .jjs-daterow-what, .jjs-daterow-when { font-weight: 600; }
.jjs-eventrow-note { font-size: 13.5px; }

/* project page */
.jjs-summary-item { padding: 10px 16px; }
.jjs-summary-value { font-size: 13.5px; font-weight: 500; }
.jjs-stage-select { font-size: 13.5px; font-weight: 600; }
.jjs-quicklink { font-weight: 500; font-size: 12.5px; }
.jjs-glance { gap: 10px; }
.jjs-glance-card { padding: 12px 14px; }
.jjs-glance-card b { font-size: 24px; }
.jjs-expect-text { font-size: 14px; line-height: 1.55; }
.jjs-datebar { margin-top: 12px; }
.jjs-step { padding-top: 14px; }
.jjs-step-label, .jjs-step > span:not(.dot) { font-size: 11.5px; font-weight: 500; }
.jjs-step.done .jjs-step-label, .jjs-step.done > span:not(.dot) { font-weight: 500; }
.jjs-step.now .jjs-step-label, .jjs-step.now > span:not(.dot) { font-weight: 600; }
.jjs-mastertable { font-size: 13.5px; }
.jjs-mastertable th { font-size: 11.5px; font-weight: 600; padding: 9px 10px; }
.jjs-mastertable tr.mrow td { padding: 10px 10px; }
.jjs-mastertable .mname { font-weight: 600; }
.jjs-editable-table input, .jjs-editable-table select { font-size: 13px; }
.jjs-feedbackbtn { font-weight: 500; }
.jjs-fbcard { padding: 12px 14px; }
.jjs-fbcard-head { margin-bottom: 8px; }
.jjs-fbcard-title, .jjs-waitrow-title, .jjs-delivname, .jjs-notetopic, .jjs-gantt-pname { font-size: 14px; font-weight: 600; }
.jjs-feedbubble { font-size: 13.5px; padding: 8px 11px; }
.jjs-feed-item { padding-bottom: 10px; }
.jjs-feed-body { padding: 8px 11px; }
.jjs-feed-note-input, .jjs-noteinfo { font-size: 13.5px; }
.jjs-feed-date-input { font-weight: 500; }
.jjs-delivrow, .jjs-noterow { padding: 9px 12px; }
.jjs-modal { padding: 20px 22px; }
.jjs-modal h3 { font-size: 23px; margin-bottom: 14px; }
.jjs-field { margin-bottom: 12px; }
.jjs-field label { font-size: 12.5px; font-weight: 500; }
.jjs-field input, .jjs-field select, .jjs-field textarea { font-size: 14px; padding: 9px 11px; }
.jjs-toast-title { font-weight: 600; }

/* counts, pills and small tags: readable size, regular emphasis */
.jjs-mastertable th { font-weight: 500; }
.jjs-navbadge, .jjs-clientbtn .cnt, .jjs-seg-count, .jjs-tabcount, .jjs-back, .jjs-menu-list button, .jjs-review-vcount { font-weight: 500; }
.jjs-navbadge.hot, .jjs-tabcount.hot { font-weight: 600; }
.jjs-pill { font-weight: 500; font-size: 11.5px; padding: 3px 10px; }
.jjs-pill.tiny, .jjs-newtag, .jjs-card-flag { font-size: 11px; }
.jjs-preview-pick label { font-weight: 500 !important; }

/* client page */
.jjs-main-locked { padding: 28px 20px 56px; }
.jjs-cp-head { gap: 4px; }
.jjs-cp-head .jjs-title { font-size: 30px; }
.jjs-cp-brand { font-size: 16px; }
.jjs-preview-banner { padding: 9px 13px; font-size: 13px; margin-bottom: 12px; }
.jjs-preview-pick { margin-bottom: 12px; }
.jjs-cp-section, .jjs-pv-card { padding: 14px 16px; border-radius: 12px; }
.jjs-cp-h2 { font-size: 19px; margin-bottom: 8px !important; }
.jjs-cp-h3 { font-size: 14px; font-weight: 600 !important; margin-bottom: 10px !important; }
.jjs-cp-attn-row { padding: 10px 0; }
.jjs-cp-attn-title { font-size: 14px; font-weight: 600; }
.jjs-clientpicker { gap: 10px; }
.jjs-clientpicker-card { padding: 14px 16px; }
.jjs-clientpicker-name { font-size: 14.5px; font-weight: 600; }
.jjs-clientpicker-flag { font-size: 12px; font-weight: 500; padding: 5px 9px; }
.jjs-clientpicker-next b, .jjs-expect b { font-weight: 500; }
.jjs-cp-projhead .jjs-pv-name { font-size: 18px; font-weight: 600; }
.jjs-cp-stage { margin-top: 10px; }
.jjs-cp-facts { margin-top: 12px; gap: 8px 24px; }
.jjs-cp-facts dd { font-size: 14px; font-weight: 600; }
.jjs-expect { margin-top: 12px; padding: 10px 13px; font-size: 14px; line-height: 1.55; }
.jjs-cp-tabs { gap: 6px; padding: 6px 0; }
.jjs-cp-tab { padding: 7px 13px; font-size: 13px; font-weight: 500; }
.jjs-cp-tab.on { font-weight: 600; }
.jjs-cp-tabcount { font-weight: 600; }
.jjs-cp-body { gap: 10px; }
.jjs-review-col { gap: 10px; }
.jjs-review-card { padding: 14px 16px; }
h3.jjs-review-title { font-size: 15px; font-weight: 600; }
.jjs-review-embed { margin-top: 10px; }
.jjs-review-notes { margin-top: 10px; font-size: 13.5px; padding: 8px 11px; }
.jjs-review-notes b { font-weight: 500; }
.jjs-review-approved { margin-top: 10px; font-size: 13px; font-weight: 500; padding: 7px 11px; }
.jjs-review-actions { gap: 8px; margin-top: 12px; }
.jjs-review-actions .jjs-btn { padding: 9px 15px; font-size: 13.5px; }
.jjs-review-history-toggle { font-weight: 500; }
.jjs-cp-panel { margin-top: 10px; padding-top: 8px; }
.jjs-cp-msg { padding: 8px 11px; }
.jjs-cp-msg-meta b { font-weight: 600; }
.jjs-composer { margin-top: 12px; padding: 10px; gap: 8px; }
.jjs-composer-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.jjs-composer textarea { min-height: 64px; font-size: 13.5px; }
.jjs-composer-hint { font-weight: 500; }
.jjs-clipcount { font-weight: 500; }

/* =========================================================================
   v23 typography: Poppins for headings, Inter for text, labels and controls
     Page title     Poppins 24px / 600      Section title  Poppins 16px / 600
     Dialog title   Poppins 18px / 600      Big numbers    Poppins 26px / 600
     Body           Inter 14px / 400        Names          Inter 14px / 600
     Meta           Inter 12.5px / 500      Small label    Inter 11px / 600, uppercase, spaced
   (This block replaces the v20 Bebas Neue styles.)
   ========================================================================= */
.jjs-title, .jjs-section-title, .jjs-modal h3, .jjs-cp-h2, .jjs-linkcol-title, .jjs-tile b, .jjs-glance-card b,
.jjs-dmain-name, .jjs-emptystate-title, .jjs-cp-h3, .jjs-pv-name, .jjs-connect-card h3 {
  font-family: var(--font-display); text-transform: none; letter-spacing: -0.01em; color: var(--ink);
}
.jjs-title { font-size: 24px; font-weight: 600; line-height: 1.25; }
.jjs-cp-head .jjs-title { font-size: 24px; }
.jjs-section-title, .jjs-cp-h2 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.jjs-cp-h3 { font-size: 15px; font-weight: 600 !important; line-height: 1.3; }
.jjs-modal h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.jjs-tile b, .jjs-glance-card b { font-size: 26px; font-weight: 600; line-height: 1.1; }
.jjs-emptystate-title { font-size: 15px; font-weight: 600; }
.jjs-dmain-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.jjs-cp-projhead .jjs-pv-name { font-size: 18px; font-weight: 600; }
.jjs-linkcol-title { font-size: 15px; font-weight: 600; }

/* small labels: Inter, quiet, uppercase so they read as labels rather than text */
.jjs-summary-label, .jjs-glance-title, .jjs-cp-facts dt, .jjs-review-kicker, .jjs-subhead, .jjs-side-section,
.jjs-eyebrow, .jjs-searchgroup-label, .jjs-gantt-group, .jjs-feedbubble-meta, .jjs-sresult-kind {
  font-family: var(--font-body); font-size: 11px; font-weight: 600 !important; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.3; color: var(--muted);
}
.jjs-eyebrow-link { color: var(--accent); }
.jjs-sresult-kind.k-comment, .jjs-sresult-kind.k-attachment { color: var(--accent); }
.jjs-subhead { margin: 12px 0 6px; }

/* Inter reads a little large next to Montserrat's old sizes; keep controls crisp */
.jjs-root { font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
.jjs-root input, .jjs-root select, .jjs-root textarea, .jjs-root button { font-family: var(--font-body); }

/* ---- Brand mark: white J logo on a dark tile, then "ust-Jame" ---- */
.jjs-brandmark { display: inline-flex; align-items: center; gap: 1px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; line-height: 1; color: #fff; white-space: nowrap; }
.jjs-logo-slot { display: inline-flex; align-items: center; height: 1.35em; }
.jjs-logo-slot .jjs-logo { margin-right: 1px; }
.jjs-logo { height: 100%; width: auto; display: block; }
.jjs-logo-fallback { font: inherit; color: #fff; }
.jjs-brand { background: var(--black); color: #fff; border-radius: 12px; padding: 12px 12px 11px 14px; align-items: center; }
.jjs-brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jjs-brand .jjs-sub { color: rgba(255,255,255,0.62); margin-top: 0; font-size: 11.5px; letter-spacing: 0.02em; }
.jjs-brand .jjs-side-close { background: transparent; border-color: rgba(255,255,255,0.25); color: #fff; }
.jjs-brand .jjs-side-close:hover { border-color: #fff; color: #fff; }
.jjs-cp-brand { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--black); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-family: var(--font-body); letter-spacing: 0; }
.jjs-cp-brand .jjs-brandmark { font-size: 16px; }
.jjs-cp-brand-sub { color: rgba(255,255,255,0.62); font-size: 12px; font-weight: 500; }
.jjs-connect-brand { display: inline-flex; align-items: center; gap: 10px; background: var(--black); border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; }
.jjs-connect-brand .jjs-sub { color: rgba(255,255,255,0.62); margin: 0; }
.jjs-brandmark.sm { font-size: 16px; }

/* ---- Motion: short, calm entrances for things that just appeared ---- */
@keyframes jjs-in-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes jjs-in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jjs-in-pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes jjs-out-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes jjs-out-pop { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(4px) scale(0.99); } }
@keyframes jjs-in-side { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes jjs-in-toast { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.jjs-enter { animation: jjs-in-up 200ms cubic-bezier(.2,.7,.3,1) both; }
.jjs-tabbody.jjs-enter, .jjs-cp-body.jjs-enter { animation-duration: 160ms; }
.jjs-modal-bg.jjs-enter { animation: jjs-in-fade 160ms ease-out both; }
.jjs-modal-bg.jjs-enter .jjs-modal { animation: jjs-in-pop 200ms cubic-bezier(.2,.7,.3,1) both; }
.jjs-modal-bg.jjs-leave { animation: jjs-out-fade 150ms ease-in both; pointer-events: none; }
.jjs-modal-bg.jjs-leave .jjs-modal { animation: jjs-out-pop 150ms ease-in both; }
.jjs-toast { animation: none; }
.jjs-toast.jjs-enter { animation: jjs-in-toast 220ms cubic-bezier(.2,.7,.3,1) both; }
.jjs-side.open.jjs-enter { animation: jjs-in-side 220ms cubic-bezier(.2,.7,.3,1) both; }
.jjs-scrim { animation: jjs-in-fade 200ms ease-out both; }
details.jjs-menu[open] > .jjs-menu-list { animation: jjs-in-pop 140ms cubic-bezier(.2,.7,.3,1) both; transform-origin: top right; }
.jjs-form-error, .jjs-composer-error:not([hidden]), .jjs-inline-alert { animation: jjs-in-fade 180ms ease-out both; }
.jjs-upbar i, .jjs-dprog-track i, .jjs-stagechip-fill { transition: width 0.3s ease; }
.jjs-btn, .jjs-chip, .jjs-tab, .jjs-cp-tab, .jjs-seg button, .jjs-navitem, .jjs-clientbtn, .jjs-card, .jjs-tile, .jjs-glance-card, .jjs-eventrow, .jjs-waititem, .jjs-sresult, .jjs-dmain, .jjs-review-card, .jjs-clientpicker-card, .jjs-attn-row {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.jjs-btn:active:not(:disabled), .jjs-cp-tab:active, .jjs-tab:active { transform: scale(0.98); }
.jjs-dmain-chev { transition: transform 0.15s ease; }

/* Respect "reduce motion": no entrances, slides or scaling — changes simply appear. */
@media (prefers-reduced-motion: reduce) {
  .jjs-root *, .jjs-root *::before, .jjs-root *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .jjs-btn:active:not(:disabled), .jjs-cp-tab:active, .jjs-tab:active { transform: none; }
}
/* ---- Deliverables (team Overview + client page) ---- */
.jjs-dmains { display: flex; flex-direction: column; gap: 8px; }
.jjs-dmain { border: 1px solid var(--panel-border); border-left: 4px solid var(--ink); border-radius: 10px; background: #fcfbf9; }
.jjs-dmain.open { background: var(--surface); box-shadow: var(--shadow); }
.jjs-dmain.ungrouped { border-left-color: var(--faint); border-style: dashed solid dashed solid; }
.jjs-dmain-head { display: flex; align-items: center; gap: 10px 14px; padding: 8px 10px 8px 6px; flex-wrap: wrap; }
.jjs-dmain-toggle { display: flex; align-items: center; gap: 10px; flex: 1 1 240px; min-width: 0; background: none; border: none; padding: 4px 6px; border-radius: 7px; cursor: pointer; text-align: left; color: var(--ink); }
.jjs-dmain-toggle:hover { background: rgba(22,22,26,0.05); }
.jjs-dmain-chev { color: var(--muted); width: 12px; font-size: 12px; flex-shrink: 0; }
.jjs-dmain-name { overflow-wrap: anywhere; }
.jjs-dmain-count { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.jjs-dmain-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jjs-dmain-tools:empty { display: none; }
.jjs-dmain-body { padding: 2px 14px 12px 34px; display: flex; flex-direction: column; gap: 8px; }
.jjs-dmain-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; white-space: pre-wrap; }
.jjs-doutputs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.jjs-doutput { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.jjs-doutput-name { font-size: 14px; font-weight: 500; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.jjs-doutput-note { font-size: 12.5px; color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48ch; }
.jjs-doutput-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-dstatus-select { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--panel-border); font-family: inherit; font-size: 12.5px; background: #fff; color: var(--ink); cursor: pointer; }
.jjs-dstatus-select:hover { border-color: var(--accent); }
.jjs-dstatus { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: #ececec; color: #444; white-space: nowrap; }
.jjs-dstatus.s-in-progress { background: #fde8cf; color: #7a4d08; }
.jjs-dstatus.s-for-review { background: #e4e0ff; color: #423699; }
.jjs-dstatus.s-approved { background: #d9f0e2; color: #196b3c; }
.jjs-dstatus.s-delivered { background: #16161a; color: #fff; }
.jjs-dadd { align-self: flex-start; }
.jjs-doutput .jjs-menu-list { left: auto; right: 0; }

/* v21: Waiting on clients list, and the client's "We're working on it" group */
.jjs-waititem { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: var(--surface); cursor: pointer; color: var(--ink); }
.jjs-waititem:hover { border-color: var(--accent); }
.jjs-waititem-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jjs-waititem-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.jjs-waititem-age { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.jjs-waititem-age.old { color: var(--warn); }
.jjs-cp-withteam { margin-top: 6px; }

/* v22: search everything */
.jjs-searchall { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; padding: 8px 10px; margin-bottom: 4px; border-radius: 9px; border: 1px dashed var(--panel-border); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13.5px; font-weight: 600; position: relative; padding-left: 34px; }
.jjs-searchall .jjs-ico { position: absolute; left: 10px; top: 10px; color: var(--muted); }
.jjs-searchall small { font-size: 12px; font-weight: 500; color: var(--muted); }
.jjs-searchall:hover { border-color: var(--accent); border-style: solid; }
.jjs-bigsearch input { font-size: 15px; padding: 11px 14px; }
.jjs-searchgroup .jjs-section-head { margin-bottom: 8px; }
.jjs-searchgroup-proj { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink); }
.jjs-searchgroup-proj:hover { color: var(--accent); }
.jjs-searchgroup-client { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.jjs-sresult { display: flex; align-items: center; gap: 8px; border: 1px solid var(--panel-border); border-radius: 10px; background: #fcfbf9; padding-right: 10px; flex-wrap: wrap; }
.jjs-sresult:hover { border-color: var(--accent); }
.jjs-sresult-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: none; border: none; padding: 9px 12px; cursor: pointer; color: var(--ink); font: inherit; }
.jjs-sresult-kind { flex: 0 0 104px; padding-top: 2px; }
.jjs-sresult-kind.k-comment, .jjs-sresult-kind.k-attachment { color: var(--accent); }
.jjs-sresult-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jjs-sresult-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.jjs-sresult-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.jjs-sresult-text { font-size: 13.5px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.jjs-sresult mark { background: #ffe8a3; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 480px) {
  .jjs-sresult-main { flex-direction: column; gap: 2px; }
  .jjs-sresult-kind { flex-basis: auto; }
  .jjs-sresult .jjs-att-actions { padding: 0 0 8px 12px; }
}
.jjs-cp-withteam .jjs-review-card { background: #fcfbf9; } /* output menus sit at the row's right edge: open leftwards */
.jjs-dprog { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.jjs-dprog-track { width: 90px; height: 6px; border-radius: 999px; background: rgba(22,22,26,0.09); overflow: hidden; display: inline-block; }
.jjs-dprog-track i { display: block; height: 100%; background: var(--good); border-radius: 999px; }
.jjs-dprog-text { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.jjs-summary-value .jjs-dprog-text, .jjs-cp-facts .jjs-dprog-text { color: var(--ink); font-size: 13.5px; }
.jjs-cp-facts dd .jjs-dprog { font-weight: 500; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1100px) {
  .jjs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jjs-home-cols { grid-template-columns: 1fr; }
  .jjs-summary-links { margin-left: 0; }
}
@media (max-width: 860px) {
  .jjs-side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(0,0,0,0.2); height: 100%; }
  .jjs-side.open { transform: translateX(0); }
  .jjs-side .jjs-side-close { display: inline-flex; }
  .jjs-scrim { display: block; position: fixed; inset: 0; background: rgba(10,10,12,0.35); z-index: 25; }
  .jjs-mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--black); color: #fff; position: sticky; top: 0; z-index: 20; }
  .jjs-mobilebar .jjs-iconbtn { background: transparent; border-color: rgba(255,255,255,0.25); color: #fff; }
  .jjs-mobilebar .jjs-iconbtn:hover { border-color: #fff; color: #fff; }
  .jjs-side .jjs-brand { margin-top: -4px; }
  .jjs-mobilebar .jjs-word { font-size: 24px; }
  .jjs-mobile-unread { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
  .jjs-main-inner { padding: 20px 16px 48px; }
  .jjs-main > .jjs-inline-alert { margin: 12px 16px 0; }
  .jjs-conflict-banner { padding: 12px 16px; top: 57px; }
  .jjs-title { font-size: 30px; }
  .jjs-pagehead { align-items: flex-start; }
  .jjs-summary-item { border-right: none; border-bottom: 1px solid var(--line); flex: 1 1 45%; }
  .jjs-2col, .jjs-3col { grid-template-columns: 1fr; }
  .jjs-linklib { grid-template-columns: 1fr; }
  .jjs-attn-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .jjs-attn-proj { flex: none; }
  .jjs-gantt-row-label { width: 160px; padding: 8px 10px; }
  .jjs-section { padding: 16px; }
  .jjs-menu-list { right: auto; left: 0; }
}
@media (max-width: 480px) {
  .jjs-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .jjs-tile { padding: 12px 14px; }
  .jjs-tile b { font-size: 28px; }
  .jjs-summary-item { flex-basis: 100%; }
  .jjs-step { min-width: 60px; }
  .jjs-step-label { font-size: 10.5px; }
  .jjs-main-locked { padding: 24px 16px 48px; }
  .jjs-cp-head .jjs-title { font-size: 28px; }
  .jjs-cp-section, .jjs-pv-card { padding: 16px; }
  .jjs-cp-attn-row { flex-direction: column; align-items: stretch; }
  .jjs-cp-tab { padding: 8px 12px; font-size: 13px; }
  .jjs-review-actions .jjs-btn { flex: 1 1 auto; }
  .jjs-composer-hint { flex-basis: 100%; order: 5; }
  .jjs-att-actions { width: 100%; justify-content: flex-end; }
  .jjs-dmain-body { padding: 2px 10px 10px 14px; }
  .jjs-dmain-name { font-size: 18px; }
  .jjs-doutput-note { max-width: 100%; }
}

/* =========================================================================
   v24: sign-in screen, client link dialog, and cross-browser / device fixes
   (last in the file on purpose, so these win over the layout rules above)
   ========================================================================= */

/* ---- sign-in + "link not available" screens ---- */
.jjs-gate-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.jjs-gate-text { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.jjs-gate-text b { color: var(--ink); }
.jjs-gate-text code { font-size: 12.5px; background: rgba(22,22,26,0.06); padding: 1px 5px; border-radius: 5px; }
.jjs-gate-form .jjs-field { margin-bottom: 12px; }
.jjs-gate-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.jjs-gate-actions .jjs-btn:last-child { margin-left: auto; }
.jjs-gate-info { font-size: 13px; color: var(--good); font-weight: 500; margin-top: 8px; }
#signinCode { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }

/* ---- sidebar: who's signed in ---- */
.jjs-whoami { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 0; font-size: 12px; color: var(--muted); min-width: 0; }
.jjs-whoami span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jjs-whoami .jjs-linktext { font-size: 12px; padding: 0; flex-shrink: 0; }
.jjs-side-note { margin: 8px 10px 0; font-size: 11.5px; line-height: 1.45; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 7px 9px; }

/* ---- client link dialog ---- */
.jjs-linkbox { display: flex; gap: 8px; align-items: stretch; }
.jjs-linkbox input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--panel-border); background: #fafafa; font-family: var(--font-body); font-size: 13px; color: var(--ink); text-overflow: ellipsis; }
.jjs-modal-actions-wrap { flex-wrap: wrap; }

/* ---- screen heights: iPhone/Android browser bars change the visible height; dvh follows them ---- */
.jjs-root, .jjs-shell, .jjs-connect-wrap { min-height: 100vh; min-height: 100dvh; }
.jjs-side { height: 100vh; height: 100dvh; }
.jjs-modal { max-height: 90vh; max-height: 90dvh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.jjs-modal-bg { overscroll-behavior: contain; }

/* ---- long words/links never push the layout wider (older Safari lacks overflow-wrap:anywhere) ---- */
@supports not (overflow-wrap: anywhere) {
  .jjs-root p, .jjs-root span, .jjs-root div, .jjs-root a { word-break: break-word; }
}
.jjs-main { min-width: 0; }
.jjs-root img { max-width: 100%; }

/* ---- form controls look and behave the same on Safari/WebKit ---- */
.jjs-root input[type="search"] { -webkit-appearance: none; appearance: none; }
.jjs-root input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.jjs-root button, .jjs-root [role="button"], .jjs-root summary { -webkit-tap-highlight-color: rgba(193,68,14,0.12); touch-action: manipulation; }
.jjs-root summary { list-style: none; }
.jjs-root summary::-webkit-details-marker { display: none; }
.jjs-root input[type="date"] { min-height: 34px; }

/* ---- keyboard focus is always visible (Safari < 15.4 has no :focus-visible, so it gets :focus) ---- */
@supports not selector(:focus-visible) {
  .jjs-root button:focus, .jjs-root a:focus, .jjs-root input:focus, .jjs-root select:focus, .jjs-root textarea:focus, .jjs-root summary:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* ---- touch screens: bigger targets, and 16px form text so iPhone Safari doesn't zoom in on focus ---- */
@media (pointer: coarse) {
  .jjs-root input, .jjs-root select, .jjs-root textarea { font-size: 16px !important; }
  .jjs-btn { min-height: 42px; }
  .jjs-btn.sm { min-height: 38px; }
  .jjs-btn.xs { min-height: 34px; padding: 6px 11px; }
  .jjs-iconbtn { min-width: 40px; min-height: 40px; }
  .jjs-iconbtn.sm { min-width: 34px; min-height: 34px; }
  .jjs-navitem, .jjs-clientbtn { min-height: 42px; }
  .jjs-tab, .jjs-cp-tab, .jjs-seg button, .jjs-chip { min-height: 38px; }
  .jjs-menu-list button { min-height: 42px; }
  .jjs-upchip-remove, .jjs-vdel { min-width: 36px; min-height: 36px; }
  .jjs-dstatus-select { min-height: 36px; }
  .jjs-review-history-toggle, .jjs-linktext { min-height: 34px; }
  .jjs-col-resizer { display: none; } /* mouse-only; columns keep their width on touch screens */
}

/* ---- tablets and phones ---- */
@media (max-width: 860px) {
  .jjs-toaststack { right: 12px; left: 12px; width: auto; max-width: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .jjs-modal-bg { align-items: flex-end; padding: 0; }
  .jjs-modal, .jjs-modal.wide { max-width: none; border-radius: 16px 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .jjs-modal-actions { flex-wrap: wrap; }
  .jjs-pagehead-actions { width: 100%; }
}
@media (max-width: 560px) {
  /* project summary as a 2-column grid instead of one long stacked list */
  .jjs-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .jjs-summary-item { flex-basis: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 9px 12px; }
  .jjs-summary-item:first-child, .jjs-summary-links { grid-column: 1 / -1; }
  .jjs-summary-item:nth-child(even):not(.jjs-summary-links) { border-left: 1px solid var(--line); }
  .jjs-summary-links { margin-left: 0; border-bottom: none; }
  .jjs-stage-select { width: 100%; }
  .jjs-2col, .jjs-3col { grid-template-columns: 1fr; }
  .jjs-linkbox { flex-direction: column; }
  .jjs-gate-actions .jjs-btn:last-child { margin-left: 0; width: 100%; }
  .jjs-connect-card { padding: 22px 18px; }
}
@media (max-width: 360px) {
  .jjs-main-inner, .jjs-main-locked { padding-left: 12px; padding-right: 12px; }
  .jjs-cp-tab { padding: 7px 10px; }
  .jjs-brandmark { font-size: 16px; }
}

/* ---- printing a client page or project (Safari/Chrome "Print"): no chrome, no motion ---- */
@media print {
  .jjs-side, .jjs-mobilebar, .jjs-toaststack, .jjs-modal-bg, .jjs-scrim, .jjs-pagehead-actions, .jjs-composer { display: none !important; }
  .jjs-root { background: #fff; }
  .jjs-root * { animation: none !important; transition: none !important; box-shadow: none !important; }
}.jjs-feed-by { font-size: 12px; color: var(--muted); }
/* progress readouts wrap instead of pushing narrow cells (phone summary grid) wider */
.jjs-dprog { flex-wrap: wrap; row-gap: 4px; white-space: normal; max-width: 100%; }
.jjs-dprog-text { white-space: nowrap; }
@media (max-width: 560px) { .jjs-summary .jjs-dprog-track, .jjs-cp-facts .jjs-dprog-track { width: 64px; } }
@media (pointer: coarse) {
  .jjs-back, .jjs-eyebrow-link, .jjs-searchgroup-proj { min-height: 36px; display: inline-flex; align-items: center; }
  .jjs-feedbackbtn, .jjs-quicklink, .jjs-delivlink { min-height: 34px; display: inline-flex; align-items: center; }
  .jjs-openlink { width: 38px; height: 38px; }
  .jjs-att-actions .jjs-btn { min-height: 36px; }
}
@media (pointer: coarse) {
  .jjs-mobile-unread { min-height: 36px; padding: 6px 12px; }
  .jjs-feed-tag-select, .jjs-feed-note-input, .jjs-feed-date-input { min-height: 38px; }
  .jjs-dmain-toggle { min-height: 40px; }
}
/* v25: testing mode (sign-in off) is always visible */
.jjs-mobilebrand { display: inline-flex; align-items: center; gap: 8px; }
.jjs-testing-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: #f0b400; color: #16161a; border-radius: 999px; padding: 2px 8px; }
.jjs-testing-note { border: 1px solid #f0d8b8; }
/* =========================================================================
   v27: client revisions
   ========================================================================= */
/* several shoot days / pending */
.jjs-shootdays { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.jjs-shootday { display: flex; align-items: center; gap: 6px; }
.jjs-shootday input { flex: 1; min-width: 0; }
/* add/edit file dialog */
.jjs-2col-wide { grid-template-columns: 2fr 1fr; }
.jjs-status-custom { margin-top: 6px; }
/* files table */
.jjs-fortag { display: inline-block; max-width: 100%; font-size: 12px; font-weight: 500; color: var(--ink); background: rgba(22,22,26,0.06); border-radius: 999px; padding: 2px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.jjs-forcell { padding: 6px 10px !important; }
.jjs-accesstag { flex-shrink: 0; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 999px; padding: 2px 7px; }
.jjs-accesstag.view { background: var(--good-soft); color: var(--good); }
.jjs-accesstag.edit { background: var(--warn-soft); color: var(--warn); }
.jjs-rowactions { white-space: nowrap; }
.jjs-rowedit { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; vertical-align: middle; }
.jjs-rowedit:hover { color: var(--accent); background: var(--accent-soft); }
/* naming guide */
.jjs-namingguide { background: var(--surface); border: 1px solid var(--panel-border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; }
.jjs-namingguide.locked { border-left-color: var(--ink); }
.jjs-namingguide.empty { border-left-color: var(--panel-border); background: rgba(255,255,255,0.6); }
.jjs-namingguide-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.jjs-namingguide-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.jjs-namingguide-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jjs-namingguide-text { margin: 0; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(22,22,26,0.035); border-radius: 8px; padding: 8px 10px; }
.jjs-namingguide-edit textarea { width: 100%; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--panel-border); resize: vertical; }
/* deliverable details + linked files */
.jjs-doutput-details { font-size: 13px; color: var(--muted); font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; line-height: 1.5; }
.jjs-doutput > .jjs-linkedfiles { flex-basis: 100%; }
.jjs-linkedfiles { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.jjs-linkedfile { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: rgba(22,22,26,0.03); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--ink); font: inherit; flex-wrap: wrap; }
.jjs-linkedfile:hover { border-color: var(--accent); }
.jjs-linkedfile-name { font-size: 13px; font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jjs-linkedfile-meta { font-size: 12px; color: var(--muted); }
/* client files */
.jjs-clientfiles .jjs-section-actions { align-items: center; }
@media (max-width: 560px) { .jjs-2col-wide { grid-template-columns: 1fr; } }
/* =========================================================================
   v28: system dialogs (replace alert / confirm / prompt), same card as the other dialogs
   ========================================================================= */
#jjsDialogHost { min-height: 0 !important; background: none !important; position: static; }
.jjs-dialog-bg { z-index: 80; }
.jjs-dialog { max-width: 420px; }
.jjs-dialog h3 { margin-bottom: 8px; }
.jjs-dialog-msg { margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.jjs-dialog .jjs-field { margin-top: 10px; }
.jjs-btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.jjs-btn.danger-solid:hover { background: #8f1c13; border-color: #8f1c13; }
@media (max-width: 860px) { .jjs-dialog { max-width: none; } }
/* v28: client feedback conversation (status + team replies) */
.jjs-fbstatus { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.2px; text-transform: none; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.jjs-fbstatus.s-open { background: var(--warn-soft); color: var(--warn); }
.jjs-fbstatus.s-in-progress { background: #e6eefc; color: #1f4f9c; }
.jjs-fbstatus.s-addressed { background: var(--good-soft); color: var(--good); }
.jjs-fbcard-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.jjs-fbconv { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.jjs-fbconv:first-child { border-top: none; }
.jjs-fbconv.unread > .jjs-feedbubble.client { box-shadow: inset 3px 0 0 var(--accent); }
.jjs-fbconv .jjs-feedbubble-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-feedbubble.deleted { background: rgba(22,22,26,0.03); border-style: dashed; border-color: var(--panel-border); }
.jjs-feedbubble.team.reply { margin-left: 24px; }
.jjs-muted-text { color: var(--muted) !important; font-style: italic; }
.jjs-fbconv-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: 24px; }
.jjs-fbstatus-select { width: auto; font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 28px 5px 10px; border-radius: 8px; border: 1px solid var(--panel-border); background-color: var(--surface); color: var(--ink); min-height: 32px; }
.jjs-replybox { margin-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.jjs-replybox textarea { width: 100%; font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--panel-border); resize: vertical; min-height: 60px; }
.jjs-replybox-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* client page: status, team replies, delete */
.jjs-cp-msg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jjs-cp-msg-meta > span:first-child { flex: 1 1 auto; min-width: 0; }
.jjs-cp-msg.deleted { background: rgba(22,22,26,0.02); border: 1px dashed var(--panel-border); }
.jjs-cp-reply { margin: 8px 0 0 14px; padding: 7px 10px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
.jjs-cp-delete { font-size: 12px; color: var(--muted); padding: 4px 2px; min-height: 28px; }
.jjs-cp-delete:hover { color: var(--bad); }
/* v28: WIP / Delivery versions under a deliverable */
.jjs-materials { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.jjs-matstage { display: flex; flex-direction: column; gap: 4px; }
.jjs-matstage-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.jjs-matrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(22,22,26,0.02); }
.jjs-matrow.latest { border-color: rgba(193,68,14,0.3); background: var(--accent-soft); }
.jjs-matver { font-size: 12px; font-weight: 700; min-width: 30px; text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--panel-border); }
.jjs-matmain { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.jjs-matname { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.jjs-matmeta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.jjs-matactions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.jjs-matolder { display: flex; flex-direction: column; gap: 4px; }
.jjs-matadd { display: flex; gap: 6px; flex-wrap: wrap; }
.jjs-matwrap { display: flex; flex-direction: column; gap: 6px; }
.jjs-matclient { margin-left: 14px; }
.jjs-matupload { margin-top: 6px; }
.jjs-field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.jjs-seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; min-height: 32px; }
.jjs-seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.jjs-seg label input { width: auto; margin: 0; }
@media (max-width: 560px) {
  .jjs-feedbubble.team.reply, .jjs-fbconv-bar, .jjs-replybox { margin-left: 12px; }
  .jjs-matactions { width: 100%; }
}
/* v28: back link on pages that had none */
.jjs-backrow { margin: 0 0 10px; }
/* v29: deliverable quantity / specs / due date */
.jjs-doutput-spec { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 2px; overflow-wrap: anywhere; }
.jjs-doutput-spec b { font-weight: 600; color: var(--ink); }
.jjs-late { color: var(--bad); font-weight: 600; }
/* v29: client brief (Google Drive) */
.jjs-briefs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jjs-brief { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(22,22,26,0.02); }
.jjs-brief.latest { border-color: rgba(193,68,14,0.3); background: var(--accent-soft); }
.jjs-brief.failed { border-color: rgba(180,35,24,0.35); background: var(--bad-soft); }
.jjs-brief-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jjs-brief-name { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.jjs-brief-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.jjs-brief-tag { font-size: 10.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.3px; margin-left: 4px; }
.jjs-brief-error { font-size: 12.5px; color: var(--bad); margin-top: 2px; overflow-wrap: anywhere; }
/* v34: Frame.io status under a Post-Production video */
.jjs-fio { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.jjs-urlcell:has(> .jjs-fio) { flex-wrap: wrap; }
.jjs-urlcell > .jjs-fio { flex-basis: 100%; }
.jjs-fio .jjs-btn.xs { min-height: 26px; }
.jjs-fio-error { flex-basis: 100%; font-size: 12px; color: var(--bad); line-height: 1.35; overflow-wrap: anywhere; }
.jjs-fio-settings .jjs-field { margin-top: 8px; }
.jjs-fio-settings > .jjs-btn { margin-top: 6px; }
.jjs-fio-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; }
.jjs-fio-bar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.jjs-fio-bar select { width: auto; max-width: 100%; min-height: 32px; font-size: 13px; }
.jjs-fio-conn { padding: 8px 0; border-top: 1px solid var(--panel-border); }
.jjs-fio-conn:first-child { border-top: 0; }
.jjs-fio-conn .jjs-btnrow { margin-top: 6px; }
.jjs-brief .jjs-upbar { max-width: 320px; }
.jjs-spinner.sm { width: 11px; height: 11px; display: inline-block; vertical-align: -1px; margin-right: 4px; }
.jjs-briefs .jjs-quiet code { font-size: 12px; }
.jjs-notice { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; font-size: 13.5px; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,0.2); max-width: calc(100vw - 32px); }
@media (max-width: 560px) { .jjs-brief .jjs-att-actions { width: 100%; } }
@media (max-width: 860px) { .jjs-briefs .jjs-section-actions .jjs-menu-list { left: auto; right: 0; } }
/* =========================================================================
   v31: content types, calendar, to-do, client point persons, document fixes
   ========================================================================= */
.jjs-dialog.wide { max-width: 760px; width: calc(100vw - 32px); }
.jjs-dialog-node { margin: 4px 0 6px; }
.jjs-mediaview { display: flex; justify-content: center; background: #111; border-radius: 10px; overflow: hidden; }
.jjs-mediaview img, .jjs-mediaview video { display: block; max-width: 100%; max-height: 70vh; }
.jjs-textview-body, .jjs-review-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; background: rgba(22,22,26,0.035); border-radius: 10px; padding: 12px 14px; max-height: 60vh; overflow: auto; }
.jjs-review-text { margin-top: 10px; max-height: 320px; }
.jjs-textview .jjs-itemnote { margin-top: 10px; }
/* type picker */
.jjs-kindpick { flex-wrap: wrap; }
.jjs-kindpick label { gap: 6px; }
.jjs-kindpick label.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.jjs-kindpick label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jjs-kindpick label:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.jjs-kindpick .jjs-ico { width: 15px; height: 15px; }
.jjs-textbody { width: 100%; font: inherit; font-size: 14px; line-height: 1.55; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--panel-border); resize: vertical; min-height: 120px; }
.jjs-contentfields .jjs-uplist { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.jjs-itemnote { font-size: 12.5px; color: var(--muted); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid var(--panel-border); padding: 2px 0 2px 8px; margin-top: 4px; }
.jjs-kindtag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.jjs-kindtag .jjs-ico { width: 14px; height: 14px; }
.jjs-contentcell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.jjs-thumb { width: 44px; height: 34px; border-radius: 6px; overflow: hidden; border: 1px solid var(--panel-border); background: rgba(22,22,26,0.04); padding: 0; cursor: zoom-in; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--faint); }
.jjs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jjs-thumb.large { width: 100%; height: auto; max-height: 420px; margin-top: 10px; border-radius: 10px; }
.jjs-thumb.large img { height: auto; max-height: 420px; object-fit: contain; background: #111; }
.jjs-review-video { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #111; }
.jjs-review-video video { display: block; width: 100%; max-height: 460px; }
.jjs-review-fileacts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.jjs-contentrow { align-items: flex-start; }
.jjs-contentrow-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jjs-rowedit { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.jjs-rowedit:hover { color: var(--accent); background: rgba(22,22,26,0.05); }
/* document fixes */
.jjs-namingguide-text { font-weight: 700; color: var(--ink); }
.jjs-daysused { white-space: nowrap; }
.jjs-daysused b { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.jjs-daysused.over b:first-child { color: var(--bad); }
.jjs-daysused small { color: var(--bad); font-weight: 600; }
.jjs-rolebadge { margin-left: 6px; font-size: 10.5px; font-weight: 600; background: rgba(255,255,255,0.12); padding: 1px 7px; border-radius: 999px; }
.jjs-fbdel { font-size: 11.5px; color: var(--muted); margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.jjs-fbdel:hover { color: var(--bad); }
.jjs-feedbubble.client.reply { margin-left: 24px; }
.jjs-feedbubble.client.reply.unread { box-shadow: inset 3px 0 0 var(--accent); }
.jjs-cp-reply.mine { border-left-color: var(--faint); background: rgba(22,22,26,0.03); }
.jjs-cp-replybtn { margin-top: 8px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.jjs-cp-replybtn .jjs-ico { width: 13px; height: 13px; }
.jjs-composer-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.jjs-composer-name input { flex: 1 1 160px; max-width: 260px; font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--panel-border); }
/* client point persons */
.jjs-contacts { border: 1px dashed var(--panel-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; }
.jjs-contacts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jjs-contacts-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.jjs-contacts-label .jjs-ico { width: 15px; height: 15px; }
.jjs-contacts-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jjs-contact { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; background: var(--surface); border: 1px solid var(--panel-border); border-radius: 9px; padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.jjs-contact:hover { border-color: var(--accent); }
.jjs-contact b { font-size: 13px; }
.jjs-contact span { font-size: 12px; color: var(--accent-ink); font-weight: 600; }
.jjs-contact small { font-size: 11.5px; color: var(--muted); }
.jjs-btn.danger { color: var(--bad); }
/* calendar */
.jjs-calbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.jjs-calnav { display: flex; align-items: center; gap: 4px; }
.jjs-caltitle { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin: 0; flex: 1 1 auto; min-width: 0; }
.jjs-callegend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.jjs-legend-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--panel-border); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 12.5px; }
.jjs-legend-item > button, button.jjs-legend-item { background: none; border: none; font: inherit; color: var(--ink); cursor: pointer; padding: 2px 2px; }
button.jjs-legend-item { padding: 5px 12px; }
.jjs-legend-item.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.jjs-swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); position: relative; cursor: pointer; flex-shrink: 0; }
.jjs-swatch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.jjs-calmonth { border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.jjs-calrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.jjs-calrow + .jjs-calrow { border-top: 1px solid var(--line); }
.jjs-calhead { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; padding: 8px; text-align: center; }
.jjs-calcell { min-height: 108px; padding: 6px; border-left: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; outline: none; }
.jjs-calcell:first-child { border-left: none; }
.jjs-calcell.out { background: rgba(22,22,26,0.025); }
.jjs-calcell.out .jjs-calnum { color: var(--faint); }
.jjs-calcell:hover { background: rgba(193,68,14,0.04); }
.jjs-calcell.sel { background: var(--accent-soft); }
.jjs-calcell:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.jjs-calnum { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; align-self: flex-start; }
.jjs-calcell.today .jjs-calnum { background: var(--accent); color: #fff; }
.jjs-calchips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jjs-calchip { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; border: none; border-radius: 5px; padding: 2px 6px; font: inherit; font-size: 11.5px; font-weight: 500; text-align: left; cursor: pointer; background: color-mix(in srgb, var(--brand) 16%, white); color: var(--ink); border-left: 3px solid var(--brand); }
.jjs-calchip.allday.k-event { background: var(--brand); color: #fff; border-left-color: rgba(0,0,0,0.15); }
.jjs-calchip.timed { background: transparent; border-left: none; }
.jjs-calchip.timed::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.jjs-calchip.done { opacity: 0.55; text-decoration: line-through; }
.jjs-calchip:hover { filter: brightness(0.96); }
.jjs-calchip-time { color: var(--muted); flex-shrink: 0; }
.jjs-calchip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jjs-calmore { font-size: 11px; color: var(--muted); padding-left: 6px; }
.jjs-caldots { display: none; gap: 3px; justify-content: center; }
.jjs-caldots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.jjs-calweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.jjs-calweekday { border-left: 1px solid var(--line); min-height: 260px; display: flex; flex-direction: column; min-width: 0; }
.jjs-calweekday:first-child { border-left: none; }
.jjs-calweekday.sel { background: var(--accent-soft); }
.jjs-calweekhead { background: none; border: none; border-bottom: 1px solid var(--line); padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; color: var(--ink); }
.jjs-calweekhead span { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.jjs-calweekhead b { font-family: var(--font-display); font-size: 20px; font-weight: 500; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.jjs-calweekday.today .jjs-calweekhead b { background: var(--accent); color: #fff; }
.jjs-calweeklist { display: flex; flex-direction: column; gap: 3px; padding: 6px; }
.jjs-calempty { color: var(--faint); font-size: 12px; text-align: center; }
.jjs-calday { border: 1px solid var(--panel-border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.jjs-calallday, .jjs-calhour { display: grid; grid-template-columns: 80px 1fr; border-top: 1px solid var(--line); min-height: 44px; }
.jjs-calallday { border-top: none; background: rgba(22,22,26,0.025); }
.jjs-calhourlabel { font-size: 12px; color: var(--muted); padding: 8px 10px; text-align: right; }
.jjs-calhourlist { padding: 5px 8px; display: flex; flex-direction: column; gap: 3px; cursor: copy; min-width: 0; }
.jjs-calhourlist .jjs-calchip { font-size: 12.5px; padding: 4px 8px; }
.jjs-calselected { margin-top: 14px; }
.jjs-callist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jjs-callist-item { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 9px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.jjs-callist-item:hover { border-color: var(--brand); }
.jjs-callist-item.done { opacity: 0.6; }
.jjs-callist-time { font-size: 12.5px; color: var(--muted); min-width: 70px; padding-top: 1px; }
.jjs-callist-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jjs-callist-main b { font-size: 14px; font-weight: 600; }
.jjs-callist-main small { font-size: 12px; color: var(--muted); }
/* to-do */
.jjs-taskadd { display: flex; gap: 8px; margin: 0 0 12px; }
.jjs-taskadd input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 14px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--panel-border); background: var(--surface); }
.jjs-todobar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jjs-todowho { font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--panel-border); background: var(--surface); max-width: 100%; }
.jjs-tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jjs-task { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.jjs-task.s-overdue { border-color: rgba(180,35,24,0.35); box-shadow: inset 3px 0 0 var(--bad); }
.jjs-task.s-today { box-shadow: inset 3px 0 0 var(--warn); }
.jjs-task.s-done { opacity: 0.6; }
.jjs-task.s-done .jjs-tasktitle { text-decoration: line-through; }
.jjs-taskcheck { padding-top: 2px; cursor: pointer; }
.jjs-taskcheck input { width: 18px; height: 18px; accent-color: var(--good); cursor: pointer; }
.jjs-taskmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jjs-tasktitle { background: none; border: none; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.jjs-tasktitle:hover { color: var(--accent); }
.jjs-taskmeta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); align-items: center; }
.jjs-taskdue.overdue { color: var(--bad); font-weight: 600; }
.jjs-taskdue.today { color: var(--warn); font-weight: 600; }
.jjs-taskactions { display: flex; gap: 2px; }
.jjs-tasklist.compact .jjs-task { padding: 7px 10px; }
.jjs-hometodo-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.jjs-hometodo .jjs-taskadd { margin-bottom: 10px; }
@media (max-width: 860px) {
  .jjs-calcell { min-height: 58px; padding: 4px 2px; align-items: center; }
  .jjs-calchips { display: none; }
  .jjs-caldots { display: flex; }
  .jjs-calnum { align-self: center; }
  .jjs-calhead { padding: 6px 2px; font-size: 10.5px; }
  .jjs-calweek { grid-template-columns: 1fr; }
  .jjs-calweekday { border-left: none; border-top: 1px solid var(--line); min-height: 0; flex-direction: row; }
  .jjs-calweekday:first-child { border-top: none; }
  .jjs-calweekhead { border-bottom: none; border-right: 1px solid var(--line); min-width: 64px; }
  .jjs-calweeklist { flex: 1 1 auto; min-width: 0; }
  .jjs-caltitle { flex-basis: 100%; order: -1; font-size: 18px; }
  .jjs-calallday, .jjs-calhour { grid-template-columns: 62px 1fr; }
  .jjs-feedbubble.client.reply { margin-left: 12px; }
}
@media (max-width: 560px) {
  .jjs-taskadd .jjs-btn { padding: 9px 12px; }
  .jjs-kindpick label span { font-size: 12.5px; }
  .jjs-contacts-list { flex-direction: column; }
}
.jjs-contentrow .jjs-att-size, .jjs-contentrow .jjs-att-name { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.jjs-contentrow-main { overflow: hidden; }
