/* Ginger CRM — Vivid White design system
   Pure white canvas · ginger #1fbf6b · type colors: blue=Website green=SEO purple=AMC */
:root {
  --ginger: #1fbf6b; --ginger-deep: #0d5c33; --ginger-soft: #ecfbf3;
  --ink: #1d2733; --ink-2: #5a6b7c; --ink-3: #7d8c9a;
  --line: #e6eaee; --line-2: #cdd5dc;
  --paper: #FFFFFF; --wash: #f4f6f8;
  --blue: #3b82c4; --blue-soft: #e8f1f9;
  --green: #1fbf6b; --green-soft: #ecfbf3;
  --purple: #f5a623; --purple-soft: #fef3e0;
  --amber: #f5a623; --amber-soft: #fef3e0;
  --red: #E5484D; --red-soft: #FDEBEC;
  --radius: 14px; --radius-s: 9px;
  --shadow: 0 1px 2px rgba(22,19,15,.04), 0 8px 24px -12px rgba(22,19,15,.10);
  --font-d: 'Outfit', system-ui, sans-serif;
  --font-b: 'Outfit', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-b); color: var(--ink); background: var(--paper); font-size: 14.5px; line-height: 1.5; }
h1,h2,h3,.num { font-family: var(--font-d); letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--ginger); text-decoration: none; }
button { font: inherit; cursor: pointer; }
/* icon safety: any inline svg defaults to text-size; specific contexts (.spark, .btn, .nav-item) override below */
svg { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.lockband svg, .fe .ico svg { width: 17px; height: 17px; }
.task-tick svg { width: 13px; height: 13px; }
input, select, textarea { font: inherit; color: var(--ink); }

/* ---------- shell (left sidebar) ---------- */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--paper); z-index: 30; }

.wordmark { font-family: var(--font-d); font-weight: 700; font-size: 23px; color: var(--ink); padding: 2px 10px 14px; }
.wordmark b { color: var(--ginger); }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); padding: 14px 10px 5px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 999px; color: var(--ink-2); font-weight: 500; border: 1px solid transparent; background: none; width: 100%; text-align: left; font-size: 14px; }
.nav-item:hover { background: var(--wash); color: var(--ink); }
.nav-item.on { background: var(--ginger); color: #fff; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(31,191,107,.4); }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; font-family: var(--font-d); }
.nav-item.on .badge { background: #fff; color: var(--ginger); }
.side .spacer { flex: 1; }
.me-chip { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.me-chip .who { line-height: 1.2; min-width: 0; }
.me-chip .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .who span { font-size: 11.5px; color: var(--ink-3); }

.main { padding: 26px 34px 70px; min-width: 0; background: var(--paper); }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; font-weight: 700; }
.topbar .sub { color: var(--ink-3); font-size: 13px; }
.topbar .push { margin-left: auto; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------- atoms ---------- */
.avatar { width: 32px; height: 32px; min-width: 32px; max-width: 32px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; font-family: var(--font-d); flex: 0 0 auto; aspect-ratio: 1; }
.avatar.s { width: 24px; height: 24px; min-width: 24px; max-width: 24px; font-size: 10px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 13.5px; color: var(--ink); transition: .12s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ginger); border-color: var(--ginger); color: #fff; box-shadow: 0 6px 16px -8px rgba(31,191,107,.4); }
.btn.primary:hover { background: var(--ginger-deep); border-color: var(--ginger-deep); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--wash); color: var(--ink); }
.btn.danger { color: var(--red); border-color: #fdebec; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.gray { background: var(--wash); color: var(--ink-2); border: 1px solid var(--line); }
.pill.ginger { background: var(--ginger-soft); color: var(--ginger-deep); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-h { display: flex; align-items: center; gap: 10px; padding: 15px 18px 0; }
.card .card-h h3 { font-size: 14.5px; font-weight: 700; }
.card .card-h .push { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card .card-b { padding: 14px 18px 17px; }

.grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; box-shadow: var(--shadow); }
.kpi .v { font-family: var(--font-d); font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--ink-3); font-size: 12px; margin-top: 3px; font-weight: 500; }
.kpi .x { font-size: 11.5px; margin-top: 6px; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=month], input:not([type]), select, textarea {
  border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 13px; background: #fff; width: 100%; font-size: 13.5px;
}
input[type=checkbox] { width: auto; padding: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ginger); outline-offset: -1px; border-color: var(--ginger); }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.row > input:not([type=date]):not([type=number]), .row > select { min-width: 130px; }
.row > .fix { flex: none; min-width: 0; }
.row > .avatar { flex: 0 0 auto; min-width: 0; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover { background: var(--wash); }
.t .num { font-weight: 600; }
.tablewrap { overflow: hidden; border-radius: var(--radius); }
/* Clients page summary stat cards */
.cstat { background: var(--wash); border-radius: var(--radius); padding: 9px 14px; min-width: 78px; }
.cstat-n { font-size: 19px; font-weight: 600; line-height: 1.2; margin-top: 2px; }
/* Website list table */
table.webt th { padding: 11px 14px; }
table.webt td { padding: 11px 14px; }
table.webt thead th[data-sortk]:hover { color: var(--ink); }
.webt .wbar { width: 84px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.webt .wbar span { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.webt a { color: var(--blue); text-decoration: none; }
.webt a:hover { text-decoration: underline; }
.webt .avatar { margin-right: -4px; }

.tabs { display: inline-flex; gap: 4px; background: var(--wash); border: 1px solid var(--line); padding: 4px; border-radius: 999px; }
.rtabs { display: flex; gap: 3px; background: var(--wash); padding: 3px; border-radius: 999px; }
.rtabs .rtab { flex: 1; border: 0; background: none; padding: 5px 0; border-radius: 999px; font-weight: 500; font-size: 11.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.rtabs .rtab.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.rtabs .rtab:hover:not(.on) { color: var(--ink); }
.tcompact th { padding: 8px 10px; font-size: 11px; }
.tcompact td { padding: 7px 10px; }
.tcompact tr.od td { background: #fdebec44; }
.ssel { position: relative; }
.wgrp .wsigs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.wsig { font-size: 12px; }
.wsig.up { color: #17a058; }
.wsig.down { color: var(--red); }
.wpill { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; }
.wpill.amber { background: #fef3e0; color: #1d2733; }
.wpill.red { background: #fdebec; color: var(--red); }
.wsep { color: var(--line); font-size: 11px; }
.pgbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.pgbar select { font-size: 13px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); margin: 0 3px; }
.pgnav { display: flex; align-items: center; gap: 4px; }
.pgn { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; color: var(--ink-2); }
.pgn:hover:not(:disabled):not(.on) { background: var(--wash); color: var(--ink); }
.pgn.on { background: var(--ginger); color: #fff; border-color: var(--ginger); font-weight: 600; }
.pgn:disabled { opacity: .4; cursor: not-allowed; }
.pgdots { color: var(--ink-3); font-size: 12px; padding: 0 2px; }
.ssel-search { width: 100%; }
.ssel-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin-top: 3px; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,.10); }
.ssel-opt { padding: 8px 11px; font-size: 13px; cursor: pointer; }
.ssel-opt:hover { background: var(--wash); }
.ssel-opt[style*="display: none"] { display: none !important; }
.tabs button { border: 0; background: none; padding: 6px 15px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22,19,15,.12); }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 30px -8px rgba(22,19,15,.4); animation: pop .18s ease; }
.toast.err { background: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.empty { text-align: center; color: var(--ink-3); padding: 26px 10px; font-size: 13.5px; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; } .b { font-weight: 600; }
.up { color: var(--green); } .down { color: var(--red); } .flat { color: var(--ink-3); }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }

/* attention list */
.att { display: flex; flex-direction: column; }
.att-row { display: flex; gap: 11px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.att-row:last-child { border-bottom: 0; }
.att-row:hover { background: var(--wash); }
.att-row .txt { flex: 1; min-width: 0; font-weight: 500; }
.att-row .txt .sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }

/* project cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; background: #fff; box-shadow: var(--shadow); cursor: pointer; transition: .12s; border-top: 3px solid var(--line-2); }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(22,19,15,.05), 0 16px 32px -14px rgba(22,19,15,.16); }
.pcard.blue { border-top-color: var(--blue); } .pcard.green { border-top-color: var(--green); } .pcard.purple { border-top-color: var(--purple); }
.pcard h3 { font-size: 15.5px; margin-bottom: 2px; }
.pcard .meta { font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.pcard .foot { display: flex; gap: 7px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* stage segments (website, per mockup) */
.stagebar { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; margin-bottom: 16px; background: #fff; box-shadow: var(--shadow); }
.stagebar .seg { flex: 1; padding: 15px 18px; border-right: 1px solid var(--line); min-width: 132px; }
.stagebar .seg:last-child { border-right: 0; }
.stagebar .nm { font-family: var(--font-d); font-weight: 700; font-size: 15.5px; }
.stagebar .ds { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stagebar .seg.done { background: var(--blue-soft); }
.stagebar .seg.done .nm, .stagebar .seg.done .ds { color: var(--blue); }
.stagebar .seg.active { background: var(--blue); }
.stagebar .seg.active .nm, .stagebar .seg.active .ds { color: #fff; }
.slipband { background: var(--amber-soft); border-radius: var(--radius); padding: 15px 20px; display: flex; gap: 15px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.slipband .blk { width: 40px; height: 40px; border-radius: 12px; background: var(--amber); flex: none; }
.slipband .tt { font-weight: 700; color: var(--ginger-deep); font-size: 15px; }
.slipband .ss { font-size: 13px; color: var(--ginger-deep); opacity: .85; }
.slipband .right { margin-left: auto; font-weight: 700; color: var(--ginger-deep); font-size: 13.5px; }

/* stage rail */
.rail { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding: 6px 0 2px; }
.rail .st { flex: 1; min-width: 110px; text-align: center; position: relative; }
.rail .st::before { content: ''; position: absolute; top: 13px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.rail .st:first-child::before { left: 50%; } .rail .st:last-child::before { right: 50%; }
.rail .knob { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: var(--ink-3); font-family: var(--font-d); }
.rail .st.done .knob { background: var(--blue); border-color: var(--blue); color: #fff; }
.rail .st.active .knob { border-color: var(--ginger); color: var(--ginger); box-shadow: 0 0 0 4px var(--ginger-soft); }
.rail .nm { font-size: 12px; font-weight: 600; margin-top: 7px; }
.rail .ds { font-size: 11px; color: var(--ink-3); }

/* entry feed */
.feed { display: flex; flex-direction: column; }
.fe { display: flex; gap: 11px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.fe:last-child { border-bottom: 0; }
.fe .bd { flex: 1; min-width: 0; }
.fe .who { font-size: 12px; color: var(--ink-3); margin-bottom: 1px; }
.fe .who b { color: var(--ink-2); }
.fe.event { color: var(--ink-2); font-size: 13px; }
.fe.event .ico { color: var(--blue); }
.fe .file-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-2); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.composer { display: flex; gap: 9px; align-items: flex-start; padding-top: 12px; border-top: 1px dashed var(--line-2); margin-top: 6px; }
.composer textarea { resize: vertical; min-height: 52px; }

/* metric entry */
.mgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.mcell label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; display: block; margin-bottom: 3px; }
.mcell .delta { font-size: 11px; margin-top: 3px; font-weight: 600; min-height: 15px; }
.spark { width: 100%; height: 46px; }
.cred { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.cred:last-child { border-bottom: 0; }
.cred .pw { font-family: ui-monospace, monospace; font-size: 13px; background: var(--wash); border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; }
.lockband { background: linear-gradient(90deg, var(--ginger-soft), #fff); border: 1px solid #fef3e0; border-radius: var(--radius); padding: 11px 16px; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ginger-deep); font-weight: 500; margin-bottom: 16px; }

/* punch button */
.punch { display: flex; align-items: center; gap: 14px; }
.punch .big { font-family: var(--font-d); font-size: 30px; font-weight: 700; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(700px 380px at 85% -10%, var(--ginger-soft), transparent 60%),
  radial-gradient(540px 320px at -10% 100%, var(--blue-soft), transparent 55%), #fff; padding: 20px; }
.login-card { width: 100%; max-width: 392px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 32px 30px; }
.login-card .wordmark { padding: 0 0 6px; font-size: 27px; }
.login-card .lead { color: var(--ink-2); font-size: 13.5px; margin-bottom: 22px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.listrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.listrow:last-child { border-bottom: 0; }
.task-tick { width: 21px; height: 21px; border-radius: 7px; border: 2px solid var(--line-2); background: #fff; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.task-tick:hover { border-color: var(--ginger); }
.task-tick.done { background: var(--green); border-color: var(--green); }
.task-tick.locked { border-style: dashed; cursor: help; }
.overdue-flag { color: var(--red); font-weight: 700; font-size: 11.5px; }

.mg-row { align-items: flex-start; }
.mg-row .task-tick { margin-top: 2px; cursor: default; color: var(--ink-3); }
.mg-row .task-tick:hover { border-color: var(--line-2); }
.mg-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mg-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.mg-chip:hover { border-color: var(--ginger); background: var(--ginger-soft); color: var(--ginger-deep); }
.mg-chip.overdue { color: var(--red); background: var(--red-soft); border-color: var(--red-soft); }
.mg-chip.overdue:hover { border-color: var(--red); }
.mg-due { font-weight: 500; opacity: 0.75; }

.two-col { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 16px; align-items: start; }
.settings-list .listrow input { border: 0; padding: 4px 6px; }
details.exp { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 14px; margin-bottom: 8px; background: #fff; }
details.exp summary { padding: 11px 0; font-weight: 600; cursor: pointer; font-size: 13.5px; }

.menu-btn { display: none; }

/* ---------- responsive (laptop-first; graceful below 1080/760) ---------- */
@media (max-width: 1080px) {
  .two-col { grid-template-columns: 1fr; }
  .mgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-100%); transition: .2s; box-shadow: 0 0 40px rgba(22,19,15,.18); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(22,19,15,.3); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .main { padding: 18px 16px 60px; }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
  .pcards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- SEO project page redesign ---------- */
.stats { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); background: #fff; }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.stat .v { font-size: 24px; font-weight: 700; font-family: var(--font-d); margin-top: 2px; }
.stat .v .vd { font-size: 13px; }
.stat .d { font-size: 12px; font-weight: 600; margin-top: 1px; }
.stat.hero { background: linear-gradient(135deg, var(--green-soft), #fff 55%); }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.entryband { border: 1.5px solid var(--ginger); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; background: linear-gradient(180deg, #fff, #f4f6f8); }
.entryband .etop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.entryband .mrow { display: grid; grid-template-columns: repeat(6, 1fr) 2fr auto; gap: 9px; align-items: end; }
.bfpill { border: 1px dashed var(--amber); color: var(--ginger-deep); background: var(--amber-soft); border-radius: 999px; padding: 2px 11px; font-weight: 600; font-size: 12px; cursor: pointer; }
.bfpill.on { background: var(--ginger); border-color: var(--ginger); color: #fff; }
.bigspark { width: 100%; height: 120px; }
.secs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.sec { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); background: #fff; }
.sec .t { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.sec .t .nm { font-family: var(--font-d); font-weight: 700; font-size: 14px; }
.sec .secinfo { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 14px; line-height: 1; padding: 0 1px; display: inline-flex; align-items: center; }
.sec .secinfo:hover { color: var(--ginger); }
.sec .secdesc { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-bottom: 9px; }
.sec .secdesc-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 4px; }
.sec .last { font-size: 13px; color: var(--ink-2); background: var(--wash); border-radius: 8px; padding: 7px 11px; margin-bottom: 8px; }
.sec .last .who { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.sec .addrow { display: flex; gap: 7px; }
.sec .addrow input { padding: 7px 11px; font-size: 13px; }
.sec.ghost { border-style: dashed; box-shadow: none; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.rep { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rep:last-child { border-bottom: 0; }
.rep .m { font-weight: 700; font-family: var(--font-d); width: 80px; font-size: 13px; flex: none; }
.tickball { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; background: var(--green); flex: none; }
.tickball.p { background: var(--amber); }
@media (max-width: 1080px) { .stats { grid-template-columns: 1fr 1fr; } .entryband .mrow { grid-template-columns: repeat(3, 1fr); } .secs { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } .entryband .mrow { grid-template-columns: 1fr 1fr; } }

/* ---------- Website project v2: journey rail + stage dossiers ---------- */
.whero { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 6px; margin-bottom: 18px; background: radial-gradient(480px 200px at 92% -40%, var(--blue-soft), transparent 60%), radial-gradient(420px 180px at 2% -50%, var(--ginger-soft), transparent 58%), #fff; }
.whero .top { display: flex; gap: 22px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.bignum { text-align: right; }
.bignum .v { font-family: var(--font-d); font-weight: 700; font-size: 30px; line-height: 1; }
.bignum .v.pct { color: var(--blue); }
.bignum .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.jrail { display: flex; margin-top: 8px; }
.jstop { flex: 1; text-align: center; position: relative; cursor: pointer; padding: 0 6px 14px; min-width: 105px; }
.jstop::before { content: ''; position: absolute; top: 17px; left: 0; right: 0; height: 3px; background: var(--line-2); }
.jstop:first-child::before { left: 50%; } .jstop:last-child::before { right: 50%; }
.jstop.done::before { background: var(--blue); }
.jstop.active::before { background: linear-gradient(90deg, var(--blue) 50%, var(--line-2) 50%); }
.jnode { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-d); font-weight: 700; font-size: 14px; color: var(--ink-3); position: relative; z-index: 1; transition: .15s; }
.jstop.done .jnode { background: var(--blue); border-color: var(--blue); color: #fff; }
.jstop.active .jnode { border-color: var(--ginger); color: var(--ginger); box-shadow: 0 0 0 6px var(--ginger-soft); }
.jstop .jnm { font-family: var(--font-d); font-weight: 700; font-size: 13px; margin-top: 7px; }
.jstop .jds { font-size: 11.5px; color: var(--ink-3); }
.jstop.sel .jnode { transform: scale(1.18); }
.jstop.sel .jnm { color: var(--blue); }
.jstop.active.sel .jnm { color: var(--ginger); }
.jstop.sel::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -19px; border: 10px solid transparent; border-bottom-color: #fff; filter: drop-shadow(0 -1.5px 0 var(--line)); z-index: 2; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ginger); margin-left: 5px; animation: gpulse 1.6s infinite; }
@keyframes gpulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.dossier { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; background: #fff; }
.dossier .dh { padding: 16px 22px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dossier.donez .dh { background: linear-gradient(135deg, var(--blue-soft), #fff 70%); }
.dossier.activez .dh { background: linear-gradient(135deg, var(--ginger-soft), #fff 70%); }
.dossier .dh h2 { font-size: 19px; font-weight: 700; }
.dstats { display: flex; gap: 24px; margin-left: auto; }
.dstat .v { font-family: var(--font-d); font-weight: 700; font-size: 19px; }
.dstat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; }
.dbody { display: grid; grid-template-columns: 1.6fr 1fr; }
.dmain { padding: 16px 22px; border-right: 1px solid var(--line); min-width: 0; }
.dside { padding: 16px 20px; background: var(--wash); min-width: 0; }
.sechead { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 14px 0 8px; }
.sechead:first-child { margin-top: 0; }
.sj { position: relative; padding-left: 20px; }
.sj::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.sj .step { position: relative; padding: 4px 0 4px 6px; font-size: 13px; }
.sj .step::before { content: ''; position: absolute; left: -19px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--blue); }
.sj .step.client::before { border-color: var(--amber); background: var(--amber-soft); }
.sj .step .w { color: var(--ink-3); font-size: 11.5px; }
.statchips { display: flex; gap: 7px; flex-wrap: wrap; }
.schip { border: 2px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 15px; font-weight: 600; font-size: 13px; cursor: pointer; }
.schip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.schip .cs { font-size: 10.5px; color: var(--amber); font-weight: 700; }
.schip.on .cs { color: #fef3e0; }
.court { display: flex; gap: 12px; align-items: center; background: var(--amber-soft); border-radius: 13px; padding: 13px 16px; margin-bottom: 12px; }
.court .cbig { font-family: var(--font-d); font-weight: 700; font-size: 15.5px; color: var(--ginger-deep); }
.court .csub { font-size: 12px; color: var(--ginger-deep); opacity: .85; }
.court.us { background: var(--green-soft); }
.court.us .cbig, .court.us .csub { color: var(--green); }
.slipline { display: flex; gap: 9px; align-items: center; background: var(--amber-soft); border-radius: 10px; padding: 9px 13px; font-size: 12.5px; color: var(--ginger-deep); font-weight: 600; margin-bottom: 14px; flex-wrap: wrap; }
.access a { font-weight: 600; }
@media (max-width: 1080px) { .dbody { grid-template-columns: 1fr; } .dmain { border-right: 0; border-bottom: 1px solid var(--line); } .jrail { overflow-x: auto; } }

.draghandle { cursor: grab; color: var(--ink-3); font-size: 16px; user-select: none; padding: 0 2px; }
.draghandle:active { cursor: grabbing; }
[data-stage][draggable=true] { outline: 2px dashed var(--ginger); outline-offset: 2px; }

/* ---------- sticky notes (My notes) ---------- */
:root { --sun: #fef3e0; --rose: #f4f6f8; --sky: #e8f1f9; --mint: #ecfbf3; --peach: #fef3e0; --lilac: #fef3e0; }
.stickyfilters { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.fchip { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip .n { opacity: .55; font-size: 11.5px; margin-left: 4px; }
.boardlbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 18px 0 10px; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 18px; align-items: start; }
.sticky { position: relative; border-radius: 4px 4px 14px 4px; padding: 15px 15px 44px; min-height: 150px;
  box-shadow: 0 1px 2px rgba(22,19,15,.08), 0 10px 22px -10px rgba(22,19,15,.26);
  font-size: 14.5px; font-weight: 500; line-height: 1.45; color: #1d2733; word-break: break-word; transition: .15s; white-space: pre-wrap; }
.sticky:hover { transform: translateY(-3px) rotate(0deg) !important; box-shadow: 0 4px 8px rgba(22,19,15,.1), 0 18px 32px -12px rgba(22,19,15,.32); }
.sticky::after { content: ''; position: absolute; right: 0; bottom: 0; border-style: solid; border-width: 0 0 24px 24px;
  border-color: transparent transparent rgba(255,255,255,.85) transparent; border-bottom-right-radius: 6px; filter: drop-shadow(-2px -2px 2px rgba(22,19,15,.06)); }
.sticky .stags { position: absolute; left: 13px; bottom: 26px; right: 13px; display: flex; gap: 5px; flex-wrap: wrap; white-space: normal; }
.tg { background: rgba(22,19,15,.08); border-radius: 999px; padding: 1px 9px; font-size: 10.5px; font-weight: 700; color: rgba(40,36,30,.75); }
.sticky .smeta { position: absolute; left: 14px; bottom: 8px; font-size: 10.5px; color: rgba(60,54,46,.5); white-space: normal; }
.sticky .sacts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.sticky:hover .sacts, .sticky:focus-within .sacts { opacity: 1; }
.sticky .sacts button { border: 0; background: rgba(255,255,255,.7); border-radius: 7px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; padding: 0; }
.sticky .spin { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 17px; filter: drop-shadow(0 2px 2px rgba(22,19,15,.25)); }
.rot0 { transform: rotate(-1.4deg); } .rot1 { transform: rotate(1.1deg); } .rot2 { transform: rotate(-.6deg); } .rot3 { transform: rotate(1.6deg); } .rot4 { transform: rotate(-1deg); }
.c-sun { background: linear-gradient(180deg, #fef3e0, var(--sun)); }
.c-rose { background: linear-gradient(180deg, #f4f6f8, var(--rose)); }
.c-sky { background: linear-gradient(180deg, #e8f1f9, var(--sky)); }
.c-mint { background: linear-gradient(180deg, #ecfbf3, var(--mint)); }
.c-peach { background: linear-gradient(180deg, #fef3e0, var(--peach)); }
.c-lilac { background: linear-gradient(180deg, #fef3e0, var(--lilac)); }
.sticky.editing { white-space: normal; }
.sticky.editing textarea { width: 100%; height: 78px; border: 0; background: transparent; resize: none; font: inherit; color: inherit; outline: none; padding: 0; }
.tagedit { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.tagedit .tg b { margin-left: 4px; cursor: pointer; opacity: .6; }
.tagedit input { border: 0; background: rgba(255,255,255,.55); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 600; width: 96px; outline: none; }
.swatches { display: flex; gap: 6px; margin-top: 8px; }
.sw { width: 19px; height: 19px; border-radius: 50%; border: 2px solid rgba(22,19,15,.18); cursor: pointer; padding: 0; }
.sw.on { border-color: var(--ink); transform: scale(1.15); }
.sticky .ebtns { position: absolute; right: 10px; bottom: 8px; display: flex; gap: 6px; }
.sticky .ebtns button { font-size: 12px; font-weight: 700; border: 0; border-radius: 999px; padding: 4px 13px; cursor: pointer; }
.sticky .ebtns .sv { background: var(--ink); color: #fff; }
.sticky .ebtns .cn { background: rgba(255,255,255,.7); }
.sticky.ghost { background: #fff; border: 2px dashed var(--line-2); box-shadow: none; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 14px; font-weight: 600; min-height: 150px; cursor: pointer; }
.sticky.ghost:hover { border-color: var(--ginger); color: var(--ginger); }
.ministrip { display: flex; gap: 10px; }
.mini { flex: 1; border-radius: 3px 3px 9px 3px; padding: 9px 10px 24px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #1d2733; min-height: 72px;
  box-shadow: 0 1px 2px rgba(22,19,15,.08), 0 6px 14px -8px rgba(22,19,15,.28); position: relative; cursor: pointer; word-break: break-word; }
.mini::after { content: ''; position: absolute; right: 0; bottom: 0; border-style: solid; border-width: 0 0 13px 13px; border-color: transparent transparent rgba(255,255,255,.85) transparent; }
.mini .tg { position: absolute; left: 8px; bottom: 6px; font-size: 9px; padding: 0 7px; }
@media (max-width: 760px) { .board { grid-template-columns: 1fr 1fr; } .ministrip { flex-wrap: wrap; } }

.avatar.img { padding: 0; overflow: hidden; background: var(--wash); }
.avatar.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- credentials v2: compact table, search, pager ---------- */
.credwrap .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.credsearch { position: relative; flex: 1; min-width: 230px; max-width: 340px; }
.credsearch input { width: 100%; padding-left: 32px; }
.credsearch::before { content: '🔍'; position: absolute; left: 10px; top: 9px; font-size: 12px; opacity: .5; }
.fgroup { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.fgroup .lab { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; margin-right: 2px; }
table.credt { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.credt th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.credt td { padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; height: 34px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.credt tr:last-child td { border-bottom: 0; }
table.credt tbody tr:hover td { background: var(--wash); }
table.credt .pill { padding: 1px 8px; font-size: 10px; }
table.credt .mask { font-family: Consolas, monospace; letter-spacing: 1.5px; font-size: 11.5px; }
.ico { border: 0; background: none; cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 5px; color: var(--ink-2); line-height: 1; }
.ico:hover { background: rgba(22,19,15,.07); }
.hl { background: #fef3e0; border-radius: 3px; padding: 0 1px; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pager .info { font-size: 12px; color: var(--ink-3); flex: 1; }
.pager button { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; min-width: 30px; height: 30px; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-2); padding: 0 8px; }
.pager button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager select { padding: 5px 8px; font-size: 12px; width: auto; }

/* ════════════ B4 "Charcoal shell, floating canvas" theme ════════════ */
:root { --shell: #1d2733; }
body { background: var(--shell); }
.shell { background: var(--shell); }
.side { background: var(--shell); border-right: 0; }
.side .wordmark { color: #fff; }
.side .nav-label { color: #5a6b7c; }
.side .nav-item { color: #a7b2bd; }
.side .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side .nav-item.on { background: var(--ginger); color: #fff; box-shadow: none; }
.side .me-chip { border-top-color: rgba(255,255,255,.12); }
.side .me-chip .who b { color: #fff; }
.side .me-chip .who span { color: #7d8c9a; }
.main { background: #f4f6f8; border-radius: 18px; margin: 13px 13px 13px 0; min-height: calc(100vh - 26px); }
.login-wrap { background: var(--shell); }

/* KPI strips become dark stat islands */
.kpi { background: var(--shell); border-color: var(--shell); box-shadow: 0 10px 24px -14px rgba(22,19,15,.5); }
.kpi .v { color: #fff; }
.kpi .l { color: #a7b2bd; }
.kpi .x { color: #a7b2bd; }
.kpi .x.muted, .kpi .muted { color: #7d8c9a; }
.kpi .overdue-flag { color: #e5484d; }
.kpis .kpi:nth-child(1) .v { color: #1fbf6b; }
.kpis .kpi:nth-child(2) .v { color: #3b82c4; }
.kpis .kpi:nth-child(3) .v { color: #3fd989; }
.kpis .kpi:nth-child(4) .v { color: #f5a623; }
.kpis .kpi:nth-child(5) .v { color: #e5484d; }
.kpis .kpi:nth-child(6) .v { color: #f5a623; }
/* alert colours set inline get remapped to their bright-on-dark versions */
.kpi .v[style*="--red"] { color: #e5484d !important; }
.kpi .v[style*="--amber"] { color: #f5a623 !important; }
.kpi .v[style*="--ginger"] { color: #1fbf6b !important; }
.kpi .v[style*="--green"] { color: #3fd989 !important; }

@media (max-width: 860px) {
  .main { margin: 8px; border-radius: 14px; }
  .side { background: var(--shell); }
}

/* B4: website dossier hero numbers as dark islands */
.whero .bignum { background: var(--shell); border-radius: 16px; padding: 12px 18px; }
.whero .bignum .v { color: #1fbf6b; }
.whero .bignum:nth-child(2) .v { color: #3fd989; }
.whero .bignum .l { color: #a7b2bd; }

/* ---------- SEO month-work card: toggle + calendar ---------- */
.mnav { display: inline-flex; align-items: center; gap: 4px; }
.viewtog { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.viewtog button { border: 0; background: #fff; padding: 5px 13px; font-weight: 600; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.viewtog button.on { background: var(--ink); color: #fff; }
.calwrap { display: grid; grid-template-columns: 1.55fr 1fr; gap: 13px; }
@media (max-width: 980px) { .calwrap { grid-template-columns: 1fr; } }
.cal { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #fff; }
.cal .dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--wash); border-bottom: 1px solid var(--line); }
.cal .dow span { padding: 5px 0; text-align: center; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.cal .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.day { min-height: 62px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; position: relative; cursor: pointer; }
.day:nth-child(7n) { border-right: 0; }
.day .dn { font-weight: 700; color: var(--ink-2); font-size: 10.5px; }
.day:hover { background: var(--wash); }
.day.out { cursor: default; background: #fff; }
.day.today { background: var(--ginger-soft); }
.day.today .dn { color: var(--ginger); }
.day.sel { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 2px; }
.day.fut { background: repeating-linear-gradient(135deg, transparent, transparent 5px, rgba(22,19,15,.018) 5px, rgba(22,19,15,.018) 10px); }
.day .dots { display: flex; gap: 2.5px; flex-wrap: wrap; margin-top: 3px; }
.day .dot, .legend .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.d0 { background: var(--ink-3); } .d1 { background: var(--blue); } .d2 { background: var(--green); } .d3 { background: var(--amber); } .d4 { background: var(--purple); }
.mtick { position: absolute; top: 4px; right: 5px; font-size: 8.5px; color: var(--green); font-weight: 800; }
.mtick.miss { color: var(--red); }
.tcount { font-size: 8.5px; font-weight: 800; color: #fff; background: var(--ink); border-radius: 999px; padding: 0 4px; position: absolute; bottom: 4px; right: 5px; font-family: var(--font-d); }
.tcount.due { background: var(--ginger); }
.dd .it { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.dd .it:last-of-type { border-bottom: 0; }
.dd .bar { width: 4px; height: 16px; border-radius: 4px; margin-top: 2px; flex: none; }
.legend { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 9px; font-size: 10.5px; color: var(--ink-2); align-items: center; }

/* ---------- project health: age chip, stall warn, hero islands ---------- */
.agechip { display: inline-flex; align-items: center; gap: 5px; background: var(--ginger-soft); color: var(--ginger-deep); border-radius: 999px; padding: 2px 11px; font-size: 11.5px; font-weight: 700; }
.warn { display: inline-flex; align-items: center; gap: 5px; background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 2px 11px; font-size: 11px; font-weight: 700; }
.herowarn { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 7px 13px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.isles4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.isles4 .isle { background: var(--shell); color: #fff; border-radius: var(--radius); padding: 12px 14px; }
.isles4 .isle .v { font-family: var(--font-d); font-size: 21px; font-weight: 800; line-height: 1; color: #fff; }
.isles4 .isle .v.c1 { color: #1fbf6b; } .isles4 .isle .v.c3 { color: #3fd989; } .isles4 .isle .v.c4 { color: #f5a623; }
.isles4 .isle .v .sub { font-size: 11px; color: #7d8c9a; font-weight: 600; margin-left: 4px; }
.isles4 .isle .l { font-size: 10px; color: #a7b2bd; font-weight: 600; margin-top: 3px; }
.isles4 .isle.alarm { box-shadow: inset 0 0 0 1.5px var(--red); }
.isles4 .bic { margin-top: 7px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.isles4 .bic i { display: block; height: 100%; background: #f5a623; }
@media (max-width: 760px) { .isles4 { grid-template-columns: 1fr 1fr; } }

/* ---------- launch checklist ---------- */
.checklistcard .clbar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0; }
.checklistcard .clbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #3fd989); border-radius: 999px; transition: width .25s; }
.checklistcard .clmeta { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; }
.clgrp { margin-top: 13px; }
.clgrp .gh { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 4px; }
.clgrp .gh .gc { margin-left: auto; font-weight: 700; font-size: 10.5px; }
.ci { display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ci:last-child { border-bottom: 0; }
.ci:hover { background: var(--wash); }
.ci .ckbox { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line-2); flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.ci.done .ckbox { background: var(--green); border-color: var(--green); }
.ci .tx { font-size: 12.5px; }
.ci.done .tx { color: var(--ink-3); text-decoration: line-through; }
.ci .who { font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.ci .reqf { font-size: 8.5px; font-weight: 800; color: var(--red); background: var(--red-soft); border-radius: 999px; padding: 0 6px; }
.lockline { display: flex; gap: 6px; align-items: center; color: var(--ink-3); background: var(--wash); border-radius: 8px; padding: 6px 10px; margin-top: 11px; }
/* settings checklist editor */
.clseti { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: #fff; }
.clseti select { flex: none; width: 140px; }
.clseti .stg { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; }
.clseti input.t { border: 1px solid var(--line); border-radius: 7px; flex: 1; min-width: 0; font: inherit; font-size: 12.5px; outline: none; background: #fff; padding: 6px 9px; }
.clseti input.t:focus { border-color: var(--ginger); }
.clseti .x { color: var(--ink-3); cursor: pointer; }

/* ---------- entry meta: avatar + timestamp ---------- */
.emeta { display: inline-flex; align-items: center; gap: 6px; }
.emeta .et { color: var(--ink-3); }
.who .emeta .avatar.s { width: 20px; height: 20px; min-width: 20px; max-width: 20px; font-size: 8px; }

/* ---------- fullscreen activity calendar overlay ---------- */
.calfs-scrim { position: fixed; inset: 0; background: rgba(22,19,15,.55); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 26px; }
.calfs-modal { background: #f4f6f8; border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); width: min(1180px, 96vw); max-height: 92vh; overflow: auto; }
.calfs-head { display: flex; align-items: center; gap: 12px; padding: 15px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; background: #f4f6f8; z-index: 1; }
.calfs-head h2 { font-size: 18px; }
.calfs-close { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; color: var(--ink-2); flex: none; }
.calfs-close:hover { border-color: var(--ginger); color: var(--ginger); }
.calfs-body { padding: 16px 22px 22px; }
/* big calendar: bigger cells + named chips. Override the inline calwrap sizing inside the modal */
.calfs-body .calwrap { grid-template-columns: 1fr 330px; }
.calfs-body .cal .day { min-height: 92px; padding: 7px 9px; font-size: 12px; }
.calfs-body .cal .day .dn { font-size: 13px; }
.calfs-body .cal .dow span { font-size: 11px; padding: 8px 0; }
.cal .day .chips { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.cal .day .chip { font-size: 9.5px; font-weight: 600; border-radius: 5px; padding: 1px 6px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cb1 { background: var(--blue); } .cb2 { background: var(--green); } .cb3 { background: var(--amber); } .cb4 { background: var(--purple); }
@media (max-width: 760px) {
  .calfs-scrim { padding: 0; }
  .calfs-modal { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .calfs-body .calwrap { grid-template-columns: 1fr; }
  .calfs-body .cal .day { min-height: 64px; }
}

/* ---------- overdue-tasks bell + dropdown ---------- */
.bell-wrap { position: relative; }
.bell-btn { position: relative; padding: 8px 11px; }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center; font-family: var(--font-d); line-height: 1.4; }
.bell-drop { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 360px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 36px -14px rgba(22,19,15,.25); z-index: 40; }
.bell-head { padding: 11px 14px 8px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.bell-item { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--ink); }
.bell-item:hover { background: var(--wash); }
.bell-item .bi-t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- generic centered modal (notification popup, chat: new group/DM/manage) ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(22,19,15,.45); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal-box { background: #f4f6f8; border-radius: 16px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); width: min(480px, 100%); max-height: 86vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; color: var(--red); }
.modal-head svg { width: 20px; height: 20px; }
.modal-head h2 { font-size: 17px; color: var(--ink); flex: 1; }
.modal-body { padding: 4px 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); }
.odue-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); color: var(--ink); margin: 0 -8px; }
.odue-row:first-child { border-top: none; }
.odue-row:hover { background: var(--wash); border-radius: 9px; }
.odue-t { font-size: 13.5px; }
@media (max-width: 560px) {
  .modal-scrim { padding: 0; align-items: flex-end; }
  .modal-box { width: 100%; border-radius: 16px 16px 0 0; max-height: 80vh; }
  .bell-drop { width: 88vw; right: -8px; }
}

/* ---------- chat ---------- */
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink); }
.chat-row:hover { background: var(--wash); }
.cr-mid { flex: 1; min-width: 0; }
.cr-name { font-weight: 600; font-size: 14px; }
.cr-prev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-room { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 420px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; }
.chat-msg { display: flex; gap: 9px; max-width: 78%; margin-bottom: 12px; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-body { background: var(--wash); border-radius: 13px; padding: 8px 12px; min-width: 0; }
.chat-msg.mine .msg-body { background: var(--ginger-soft); }
.chat-msg.deleted .msg-body { opacity: .6; font-style: italic; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-meta b { font-size: 12.5px; }
.msg-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg-text .mtag { background: var(--ginger-soft); color: var(--ginger-deep); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.msg-quote { border-left: 3px solid var(--line-2); padding: 3px 8px; margin-bottom: 5px; font-size: 12px; color: var(--ink-2); cursor: pointer; border-radius: 0 6px 6px 0; }
.msg-quote:hover { background: rgba(0,0,0,.04); }
.msg-actions { display: flex; gap: 10px; margin-top: 4px; opacity: 0; transition: .12s; }
.chat-msg:hover .msg-actions { opacity: 1; }
.msg-act { font-size: 11px; font-weight: 600; color: var(--ink-3); background: none; border: none; cursor: pointer; padding: 0; }
.msg-act:hover { color: var(--ginger); }
.chat-msg[data-mid].flash .msg-body { animation: flashHi 1.2s ease; }
@keyframes flashHi { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px var(--ginger); } }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 14px; background: #fff; }
.reply-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--wash); border-radius: 9px; padding: 6px 10px; margin-bottom: 7px; }
.chat-input-wrap { position: relative; display: flex; align-items: flex-end; gap: 9px; }
.chat-input-wrap textarea { flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 14px; padding: 9px 13px; font: inherit; max-height: 120px; }
.chat-input-wrap textarea:focus { outline: none; border-color: var(--ginger); }
.mention-pop { position: absolute; bottom: calc(100% + 8px); left: 0; width: 240px; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 14px 36px -14px rgba(22,19,15,.3); z-index: 10; }
.mention-opt { display: flex; align-items: center; gap: 8px; padding: 8px 11px; font-size: 13px; cursor: pointer; }
.mention-opt:hover { background: var(--wash); }
@media (max-width: 760px) {
  .chat-room { height: calc(100vh - 230px); }
  .chat-msg { max-width: 90%; }
}

/* ---------- reports: QBR value sheet ---------- */
.qbrhead { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.kgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 6px; }
.kbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kbox .v { font-size: 22px; font-weight: 800; font-family: var(--font-d); }
.kbox .v .u { font-size: 11px; font-weight: 700; margin-left: 3px; }
.kbox .l { font-size: 10.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.delivered { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.delivered .dcol h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.delivered .dcol .big { font-size: 24px; font-weight: 800; font-family: var(--font-d); color: var(--ginger); }
.delivered .dcol .lst { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.delivered .dcol .lst div { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.qbrnote { margin-top: 16px; background: var(--wash); border-radius: 11px; padding: 12px 15px; font-size: 12px; color: var(--ink-2); }
@media (max-width: 760px) { .kgrid, .delivered { grid-template-columns: 1fr 1fr; } }

/* print: only the QBR sheet, clean for client PDF */
@media print {
  body * { visibility: hidden; }
  #qbrSheet, #qbrSheet * { visibility: visible; }
  #qbrSheet { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
  .side, .row.mb { display: none !important; }
}

/* ---------- reports ---------- */
.cdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }
.conrow { display: flex; align-items: center; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.conrow:last-child { border-bottom: 0; }
.conrow .cn { flex: 1; font-weight: 600; }
.conrow .cbar { width: 130px; height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; flex: none; }
.conrow .cbar i { display: block; height: 100%; border-radius: 999px; }
.conrow .cpct { width: 42px; text-align: right; font-weight: 700; color: var(--ink-2); }
.conrow .cmo { width: 110px; text-align: right; color: var(--ink-3); font-weight: 600; }
/* QBR sheet */
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sheethd { background: linear-gradient(100deg, var(--ginger-soft), #fff 60%); padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.sheethd h2 { font-size: 19px; } .sheethd .sub { font-size: 12px; color: var(--ink-2); }
.sheetbody { padding: 18px 22px 22px; }
.kgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 16px; }
.kbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kbox .v { font-size: 22px; font-weight: 800; font-family: var(--font-d); }
.kbox .v .u { font-size: 11px; font-weight: 700; margin-left: 3px; }
.kbox .l { font-size: 10.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.u.up { color: var(--green); } .u.dn { color: var(--red); }
.qbrh { font-size: 12.5px; margin-bottom: 9px; }
.qbrtrend { height: 80px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, var(--green-soft), #fff); position: relative; margin-bottom: 18px; overflow: hidden; }
.delivered { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.dcol h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.dcol .big { font-size: 24px; font-weight: 800; font-family: var(--font-d); color: var(--ginger); }
.dcol .lst { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.dcol .lst div { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.qbrfoot { margin-top: 16px; background: var(--wash); border-radius: 11px; padding: 12px 15px; font-size: 12px; color: var(--ink-2); }
@media (max-width: 760px) { .kgrid, .delivered { grid-template-columns: 1fr 1fr; } }
/* print: clean client-ready sheet only */
@media print {
  body * { visibility: hidden !important; }
  #qbrSheet, #qbrSheet * { visibility: visible !important; }
  #qbrSheet { position: absolute; left: 0; top: 0; width: 100%; border: 0; box-shadow: none; }
  .side, .menu-btn { display: none !important; }
}

/* ---------- trend chart hover ---------- */
.trwrap { position: relative; }
.trwrap .bigspark { display: block; width: 100%; height: 120px; }
.trdots { position: absolute; inset: 0; pointer-events: none; }
.trdot { position: absolute; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; pointer-events: auto; }
.trdot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); border-radius: 50%; background: transparent; transition: background .1s; }
.trdot:hover::after { background: var(--ink); box-shadow: 0 0 0 3px rgba(22,19,15,.12); }
.trtip { position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }


/* ── Dark sidebar (Ginger Domain brand) ──────────────────────────────────── */
.side {
  background: #0f1720 !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
}
.side .wordmark { padding: 4px 6px 16px; }
.side .nav-label { color: rgba(255,255,255,0.32) !important; }
.side .nav-item { color: rgba(255,255,255,0.58) !important; }
.side .nav-item:hover { background: rgba(255,255,255,0.07) !important; color: rgba(255,255,255,0.92) !important; }
.side .nav-item.on { background: #1fbf6b !important; color: #fff !important; box-shadow: 0 4px 14px -4px rgba(31,191,107,.5) !important; }
.side .nav-item .badge { background: rgba(255,255,255,0.15) !important; }
.side .nav-item.on .badge { background: rgba(255,255,255,0.25) !important; color: #fff !important; }
.side .me-chip { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; margin-top: 4px; }
.side .me-chip .who b { color: rgba(255,255,255,0.88) !important; }
.side .me-chip .who span { color: rgba(255,255,255,0.42) !important; }
.side #logoutBtn { color: rgba(255,255,255,0.42) !important; }
.side #logoutBtn:hover { color: rgba(255,255,255,0.85) !important; background: rgba(255,255,255,0.07) !important; }

/* ---- Project files (tagged central asset library) ---- */
.filescard .fileup { gap: 8px; align-items: center; }
.filescard .filtrow { display: flex; flex-wrap: wrap; gap: 6px; }
.filescard .btn.filt { font-weight: 600; }
.filescard .btn.filt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filescard .btn.filt.on .muted { color: #cdd5dc; }
.filescard .filelist { display: flex; flex-direction: column; }
.filescard .filerow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.filescard .filerow:last-child { border-bottom: 0; }
.filescard .filerow .fname { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filescard .filerow .fmeta { white-space: nowrap; }
.filescard .filerow .facts { display: flex; gap: 2px; margin-left: auto; }
.filescard .filerow .fdel.arm { color: var(--red); font-weight: 700; }
@media (max-width: 720px) {
  .filescard .filerow { flex-wrap: wrap; }
  .filescard .filerow .fmeta { width: 100%; order: 3; }
}

/* Launch checklist + Files, side by side (stacks on narrow screens) */
.ck-files-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.ck-files-row > .card { margin-bottom: 0; }
@media (max-width: 900px) { .ck-files-row { grid-template-columns: 1fr; } }

/* Inline note editor in the Leads table */
.notecell { width: 210px; min-height: 46px; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 8px; resize: vertical; color: var(--ink); background: #fff; }
.notecell:focus { border-color: var(--ginger); outline: none; }
.notecell::placeholder { color: var(--ink-3); }

/* ---------- keyword rank tracking (v53) ---------- */
.kwedit .kwchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kwchip { display: inline-flex; align-items: center; gap: 6px; background: var(--ginger-soft); color: var(--ginger-deep); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; }
.kwchip b { cursor: pointer; opacity: .55; font-weight: 700; }
.kwchip b:hover { opacity: 1; color: var(--red); }
.kwmove { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kwm { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 13px; font-size: 12px; font-weight: 700; }
.kwm.up { background: var(--green-soft); color: var(--ginger-deep); }
.kwm.dn { background: var(--red-soft); color: var(--red); }
.kwm .arrow { font-size: 12px; }
.sdband { border: 1.5px solid var(--amber); background: linear-gradient(180deg, #fff, #fffaf1); border-radius: var(--radius); padding: 13px 16px; }
.sdband .tt { font-weight: 800; font-size: 13.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.sdband .ss { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.sdrow { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-top: 1px dashed var(--line); font-size: 13px; }
.sdrow .kw { flex: 1; font-weight: 600; min-width: 0; }
.sdrow .pos { font-weight: 800; font-family: var(--font-d); width: 40px; text-align: right; }
.sdrow .gain { font-size: 11.5px; color: var(--ink-3); width: 96px; text-align: right; }
.sdrow .remind { border: 0; background: none; color: var(--ginger); font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px 4px; white-space: nowrap; }
.sdrow .remind:hover { text-decoration: underline; }
@media (max-width: 560px) { .sdrow .gain { display: none; } }

/* ---------- monthly work quotas ---------- */
.qwrap { margin: 4px 0 9px; }
.qbar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 4px; }
.qbar i { display: block; height: 100%; border-radius: 999px; transition: width .25s; }
.qmeta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.qmeta .qn { color: var(--ink); font-weight: 800; font-family: var(--font-d); }
.qedit { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.qsetrow { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.qsetrow:last-child { border-bottom: 0; }
.qsetrow .n { flex: 1; font-weight: 600; }
.qsetrow input { width: 72px; text-align: center; padding: 6px 9px; }
.qsetrow .per { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.myday-q { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.myday-q:last-of-type { border-bottom: 0; }
.myday-q .mq-main { flex: 1; min-width: 0; }
.myday-q .mq-bar { width: 84px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; flex: none; }
.myday-q .mq-bar i { display: block; height: 100%; border-radius: 999px; }
@media (max-width: 560px) { .myday-q .mq-bar { display: none; } }

/* ══════════════════════════════════════════════════════════════════════
   MOBILE-FIRST EFFICIENCY LAYER
   Everything below is scoped inside max-width media queries only.
   Desktop (>760px) rendering is 100% unchanged by this block.
   ══════════════════════════════════════════════════════════════════════ */

/* ---- iOS zoom-on-focus fix: any field under 16px triggers Safari to
   zoom the viewport when tapped. Bump to 16px on phones only. ---- */
@media (max-width: 760px) {
  input[type=text], input[type=email], input[type=password], input[type=date],
  input[type=number], input[type=month], input:not([type]), select, textarea {
    font-size: 16px;
  }
  .notecell { font-size: 16px; }
}

/* ---- scrollable tables instead of crushed columns or clipped content ---- */
@media (max-width: 760px) {
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tablewrap table.t { min-width: 620px; }
  /* generic fallback for tables not already inside a .tablewrap-classed card */
  .card-b:has(> table.t), .card-b:has(> table.credt), .card:has(> table.credt) {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .card-b:has(> table.t) table.t, .card-b:has(> table.credt) table.credt, .card:has(> table.credt) table.credt {
    min-width: 560px;
  }
  table.t th, table.t td { padding: 8px 9px; }
  table.credt th, table.credt td { padding: 6px 7px; }
}

/* ---- bigger, thumb-friendly tap targets ---- */
@media (max-width: 760px) {
  .nav-item { padding: 11px 12px; font-size: 14.5px; }
  .btn { padding: 10px 16px; min-height: 40px; }
  .btn.sm { padding: 8px 13px; min-height: 34px; }
  .pgn { padding: 7px 12px; min-height: 32px; }
  .ico { padding: 6px 8px; }
  .tabs button, .rtabs .rtab { padding: 8px 14px; }
  .card .card-h { flex-wrap: wrap; }
  .card .card-h .push { flex-wrap: wrap; margin-left: 0; width: 100%; justify-content: flex-start; }
  .card .card-h h3 { width: 100%; }
}

/* ---- prevent any stray element from forcing whole-page horizontal scroll ---- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .main { overflow-x: hidden; }
}

/* ---- tighter grids on phones: drop straight to 1-2 columns instead of
   stopping at a still-cramped mid-size grid ---- */
@media (max-width: 760px) {
  .isles4 { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kgrid, .delivered { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: 1fr 1fr; gap: 12px; }
  .credwrap .toolbar { gap: 8px; }
  .credsearch { min-width: 0; flex: 1 1 100%; max-width: none; }
  .dstats { gap: 14px; flex-wrap: wrap; }
  .whero .top { justify-content: center; text-align: center; }
  .stagebar .seg { min-width: 108px; padding: 12px 13px; }
}

@media (max-width: 480px) {
  .isles4, .kgrid, .delivered, .board { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .pcards { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 20px; }
  .main { padding: 14px 12px 50px; }
  .card .card-b { padding: 12px 14px 15px; }
}

/* ============================================================
   v57 — MOBILE-FIRST PASS
   Every rule below is scoped to ≤760px or touch-only queries.
   Desktop rendering is completely untouched.
   ============================================================ */

/* Bottom tab bar (dark shell, matches sidebar) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    background: var(--shell); border-top: 1px solid rgba(255,255,255,.09);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); }
  .tabbar .nav-item { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 5px 2px;
    border-radius: 10px; font-size: 10px; font-weight: 600; color: #a7b2bd; text-align: center;
    align-items: center; justify-content: center; position: relative; }
  .tabbar .nav-item svg { width: 21px; height: 21px; }
  .tabbar .nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar .nav-item:hover { background: none; color: #a7b2bd; }
  .tabbar .nav-item.on { background: none; color: var(--ginger); box-shadow: none; font-weight: 700; }
  .tabbar .nav-item .badge { position: absolute; top: 0; left: calc(50% + 4px); margin-left: 0;
    background: var(--red); color: #fff; font-size: 9px; padding: 1px 5px; }
  .tabbar .nav-item.on .badge { background: var(--red); color: #fff; }

  /* Menu tab replaces the topbar hamburger */
  .menu-btn { display: none !important; }

  /* Main content clears the tab bar */
  .main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .shell { padding-bottom: 0; }

  /* Drawer: dynamic-viewport height + safe areas (colors inherited from desktop) */
  .side { width: min(280px, 84vw); height: 100dvh;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    padding-left: calc(14px + env(safe-area-inset-left)); }
  .scrim { z-index: 28; }

  /* Tables swipe sideways instead of clipping */
  .scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .scrollx > table.t { min-width: 520px; }
  .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tablewrap table.t { min-width: 520px; }

  /* 16px inputs stop iOS focus-zoom */
  input[type=text], input[type=email], input[type=password], input[type=date],
  input[type=number], input[type=month], input:not([type]), select, textarea { font-size: 16px; }

  /* Comfortable touch targets */
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; }
  .side .nav-item { padding: 11px 12px; }
  table.t td { padding-top: 11px; padding-bottom: 11px; }
  .bell-btn { min-height: 40px; min-width: 42px; justify-content: center; }

  /* iOS URL-bar-safe heights (dvh) + tab bar clearance */
  .chat-room { height: calc(100dvh - 320px); min-height: 320px; }
  .calfs-modal { height: 100dvh; }
  .modal-box { max-height: 82dvh; padding-bottom: env(safe-area-inset-bottom); }
}

/* Touch devices: chat message actions are always visible (no hover on phones) */
@media (hover: none) {
  .msg-actions { opacity: 1; }
}

/* v57.1 hotfix — grid tracks refused to shrink below table content width,
   pushing cards past the right edge of the phone screen. Clamp every
   layout track to the viewport so inner tables scroll instead of
   stretching the page. Mobile-only; desktop untouched. */
@media (max-width: 760px) {
  .two-col, .grid, .secs, .dbody, .calwrap { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .two-col > *, .grid > *, .secs > *, .stats > *, .dbody > *, .calwrap > *, #body > * { min-width: 0; }
  .card { min-width: 0; max-width: 100%; }
  .card .card-b, .card .card-h { min-width: 0; }
  .card .card-b > div[style*="overflow-x"], .card .card-b .scrollx { max-width: 100%; }
  .sdband .ss, .sdband .sdrow .kw { overflow-wrap: anywhere; }
}

/* v59 — non-admin pipeline teaser (blurred fake project cards).
   Renders on desktop and mobile; admins never see it. */
.teaser { position: relative; margin-top: 15px; }
.teaser-blur { filter: blur(5px); opacity: .7; pointer-events: none; user-select: none; }
.teaser-blur .pcard { cursor: default; }
.teaser-blur .pcard:hover { transform: none; box-shadow: var(--shadow); }
.teaser .av-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.teaser-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; text-align: center; pointer-events: none; }
.teaser-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--shell, #0f1720);
  color: #fff; font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(15,23,32,.28); }
.teaser-chip svg { width: 15px; height: 15px; }
.teaser-sub { font-size: 12px; color: var(--ink-3); background: var(--paper); padding: 3px 10px; border-radius: 7px; }

/* v59 — pasted-link handling in entries (fixes blank-tab clicks + box deforming).
   Applies on desktop and mobile. */
.elink { color: var(--ginger); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.elink:hover { color: var(--ginger-deep); }
.fe .bd .etext { overflow-wrap: anywhere; }
.sec .last { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
