/* ConsultTrack — mobile-first stylesheet */
:root {
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11,11,11,0.10);
  --accent: #2a78d6;        /* series-1 blue */
  --accent-deep: #1c5cab;
  --orange: #eb6834;        /* series-2 */
  --aqua: #1baf7a;          /* series-3 */
  --good-text: #006300;
  --bad: #d03b3b;
  --radius: 12px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 14px; }

/* ---- top bar ---- */
.topbar { background: #14213d; color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; margin-right: auto; letter-spacing: .2px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a { color: #dbe4f5; text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav a.nav-log { background: var(--accent); color: #fff; font-weight: 600; }
.nav a.muted { color: #9fb0cf; }
.badge { background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }

main { padding: 18px 14px 80px; }

/* ---- cards & layout ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.card h3 { margin: 0 0 8px; font-size: .95rem; color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.tile .t-num { font-size: 1.7rem; font-weight: 700; line-height: 1.15; }
.tile .t-lbl { font-size: .8rem; color: var(--ink-2); margin-top: 2px; }
.tile.t-accent .t-num { color: var(--accent-deep); }

/* ---- month picker ---- */
.monthbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.monthbar .m-title { font-size: 1.25rem; font-weight: 700; margin-right: auto; }
.monthbar a.m-arrow, .monthbar button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 1rem; cursor: pointer;
}
.monthbar select { height: 40px; border-radius: 10px; border: 1px solid var(--baseline); background: var(--surface); padding: 0 8px; font-size: .95rem; }

/* ---- timeline entries ---- */
.entry { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.entry:last-child { border-bottom: none; }
.entry .e-icon { font-size: 1.3rem; line-height: 1.2; flex: 0 0 auto; }
.entry .e-body { flex: 1; min-width: 0; }
.entry .e-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.entry .e-title { font-weight: 600; }
.entry .e-type { font-size: .75rem; background: #eef3fb; color: var(--accent-deep); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.entry .e-date { font-size: .8rem; color: var(--muted); margin-left: auto; white-space: nowrap; }
.entry .e-text { color: var(--ink-2); font-size: .92rem; margin-top: 3px; white-space: pre-line; }
.entry .e-outcome { margin-top: 6px; font-size: .9rem; background: #f2f9f2; border-left: 3px solid var(--good-text); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.entry .e-next { margin-top: 6px; font-size: .9rem; background: #fdf6ec; border-left: 3px solid var(--orange); padding: 6px 10px; border-radius: 0 8px 8px 0; }
.entry .e-meta { margin-top: 6px; font-size: .8rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.entry.e-planned { opacity: .92; background: #fbfaf6; border-radius: 8px; padding: 12px; border-bottom: none; margin-bottom: 8px; border: 1px dashed var(--baseline); }

/* ---- forms ---- */
form .field { margin-bottom: 14px; }
label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=month], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--baseline);
  border-radius: 10px; font-size: 1rem; background: var(--surface); color: var(--ink);
  font-family: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .row4 { grid-template-columns: repeat(4, 1fr); } }
.hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  padding: 12px 22px; border-radius: 10px; font-size: 1rem; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--accent-deep); border: 1px solid var(--baseline); }
.btn-ghost:hover { background: #eef3fb; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-danger { background: var(--bad); }
.btn-block { display: block; width: 100%; }

/* ---- activity type picker (quick log) ---- */
.typegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .typegrid { grid-template-columns: repeat(5, 1fr); } }
.typegrid input[type=radio] { position: absolute; opacity: 0; }
.typegrid .tg-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--baseline); border-radius: 10px; padding: 9px 4px;
  cursor: pointer; font-size: .74rem; text-align: center; color: var(--ink-2);
  background: var(--surface); user-select: none;
}
.typegrid .tg-item .tg-ico { font-size: 1.25rem; }
.typegrid input[type=radio]:checked + .tg-item {
  border-color: var(--accent); background: #eef3fb; color: var(--accent-deep); font-weight: 600;
  outline: 2px solid var(--accent); outline-offset: -1px;
}

/* ---- tables ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--grid); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl-scroll { overflow-x: auto; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; }
.c-title { font-size: 13px; font-weight: 600; fill: var(--ink-2); }
.c-grid { stroke: var(--grid); stroke-width: 1; }
.c-baseline { stroke: var(--baseline); stroke-width: 1; }
.c-tick { font-size: 10px; fill: var(--muted); }
.c-peak { font-size: 11px; font-weight: 600; fill: var(--ink-2); }
.c-bar:hover { opacity: .82; }

/* ---- comments ---- */
.comment { padding: 10px 0; border-bottom: 1px solid var(--grid); }
.comment:last-child { border-bottom: none; }
.comment .c-who { font-weight: 600; font-size: .9rem; }
.comment .c-when { color: var(--muted); font-size: .78rem; margin-left: 6px; }
.comment .c-body { font-size: .92rem; color: var(--ink-2); margin-top: 2px; white-space: pre-line; }

/* ---- misc ---- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .95rem; }
.flash-ok { background: #eaf6ea; color: var(--good-text); border: 1px solid #bfe3bf; }
.flash-err { background: #fdecec; color: #8f1f1f; border: 1px solid #f2c4c4; }
.pill { display: inline-block; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--grid); color: var(--ink-2); }
.pill.p-active { background: #eaf6ea; color: var(--good-text); }
.pill.p-paused { background: #fdf6ec; color: #8a5a00; }
.pill.p-completed { background: #eef3fb; color: var(--accent-deep); }
.muted-txt { color: var(--muted); font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: .95rem; }

.fab {
  position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.9rem;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 4px 14px rgba(20,33,61,.35); z-index: 30;
}
.fab:hover { background: var(--accent-deep); }
@media (min-width: 760px) { .fab { display: none; } }

.foot { color: var(--muted); font-size: .8rem; padding: 20px 0 30px; text-align: center; }

/* ---- login ---- */
.login-box { max-width: 400px; margin: 8vh auto 0; }
.login-box .brand-big { text-align: center; font-size: 1.5rem; font-weight: 700; margin-bottom: 18px; color: #14213d; }

/* ---- client header ---- */
.client-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.client-head h1 { margin: 0; font-size: 1.4rem; margin-right: auto; }
.client-head .sub { width: 100%; color: var(--ink-2); font-size: .9rem; }

/* print */
@media print {
  .topbar, .fab, .foot, .monthbar a.m-arrow, form, .btn { display: none !important; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
}

/* ============================================================
   v2 — professional consulting-firm design layer
   ============================================================ */
:root {
  --navy: #0f1b33;
  --navy-2: #16264a;
  --gold: #c9a227;
  --radius: 14px;
}
body { background: #f4f5f7; }
.topbar {
  background: linear-gradient(135deg, #0f1b33 0%, #1b2f5c 100%);
  border-bottom: 3px solid var(--gold);
}
.brand { letter-spacing: .4px; }
.card {
  border: 1px solid rgba(11,11,11,.07);
  box-shadow: 0 1px 2px rgba(15,27,51,.05), 0 4px 16px rgba(15,27,51,.05);
}
.card h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .6px; color: #33415e; }
.tile {
  border: 1px solid rgba(11,11,11,.07);
  box-shadow: 0 1px 2px rgba(15,27,51,.05);
  position: relative; overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--grid);
}
.tile.t-accent::before { background: var(--accent); }
.tile .t-num { font-size: 1.85rem; letter-spacing: -.5px; color: var(--navy); }
.tile.t-accent .t-num { color: var(--accent-deep); }
.t-delta { font-size: .72rem; margin-top: 4px; font-weight: 600; }
.t-delta.d-up   { color: var(--good-text); }
.t-delta.d-down { color: #a12525; }
.t-delta.d-flat { color: var(--muted); }
.m-title { color: var(--navy); letter-spacing: -.3px; }
.login-box .brand-big { color: var(--navy); }
.login-box .card { border-top: 3px solid var(--gold); }

/* chart category labels */
.c-cat { font-size: 11px; fill: var(--ink-2); }

/* ---- upcoming strip (dashboard) ---- */
.up-strip { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .up-strip { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }
.up-item {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--grid); border-left: 3px solid var(--orange);
  border-radius: 10px; padding: 10px 12px; background: #fffdf8;
}
.up-item:hover { border-color: var(--accent); }
.up-date { font-size: .75rem; font-weight: 700; color: #8a5a00; text-transform: uppercase; letter-spacing: .4px; }
.up-title { font-size: .92rem; font-weight: 600; margin: 2px 0; }
.up-client { font-size: .78rem; color: var(--muted); }

/* ---- calendar ---- */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-head div { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  min-height: 74px; border: 1px solid var(--grid); border-radius: 8px;
  padding: 4px; background: var(--surface); font-size: .75rem; overflow: hidden;
}
.cal-empty { background: transparent; border-style: dashed; opacity: .45; }
.cal-today { outline: 2px solid var(--accent); outline-offset: -1px; }
.cal-day { font-weight: 700; color: var(--ink-2); margin-bottom: 3px; display: flex; gap: 6px; align-items: baseline; }
.cal-today-dot { font-size: .62rem; color: var(--accent-deep); font-weight: 700; text-transform: uppercase; }
.cal-chip {
  display: block; margin-bottom: 3px; padding: 2px 5px; border-radius: 6px;
  font-size: .68rem; line-height: 1.35; text-decoration: none; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip b { font-weight: 700; }
.chip-planned { background: #fdf3e3; border: 1px solid #eed9a9; color: #7a5200; }
.chip-done    { background: #e9f1fb; border: 1px solid #c9dcf5; color: var(--accent-deep); }
a.cal-chip:hover { filter: brightness(.96); }
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: .78rem; color: var(--muted); align-items: center; }
.cal-legend .cal-chip { display: inline-block; margin: 0 4px 0 0; padding: 0 4px; }
@media (max-width: 700px) {
  .cal-cell { min-height: 52px; }
  .cal-chip { font-size: .6rem; }
}

/* ---- milestone timeline ---- */
.mtl { position: relative; padding-left: 8px; }
.mtl-item { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.mtl-item::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 0;
  width: 2px; background: var(--grid);
}
.mtl-item:last-child::before { display: none; }
.mtl-dot {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  background: #fdf3e3; border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: .95rem; z-index: 1;
}
.mtl-new .mtl-dot { background: var(--gold); }
.mtl-date { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #8a6a00; }
.mtl-title { font-weight: 600; }
.mtl-new .mtl-title::after { content: " NEW"; font-size: .62rem; color: var(--good-text); font-weight: 800; letter-spacing: .5px; }

/* ---- monthly report ---- */
.report-body { background: #eceef2; }
.rpt-toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  max-width: 900px; margin: 14px auto 0; padding: 0 14px;
}
.rpt {
  max-width: 900px; margin: 14px auto 40px; background: #fff;
  border: 1px solid rgba(11,11,11,.1); border-radius: 12px;
  padding: 40px 44px; box-shadow: 0 8px 30px rgba(15,27,51,.10);
}
.rpt-cover { border-bottom: 3px solid var(--gold); padding-bottom: 24px; margin-bottom: 28px; }
.rpt-brand { font-size: .85rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.rpt-cover h1 { margin: 6px 0 18px; font-size: 1.9rem; color: var(--navy); letter-spacing: -.5px; }
.rpt-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
@media (min-width: 700px) { .rpt-meta { grid-template-columns: repeat(4, 1fr); } }
.rpt-meta span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.rpt-meta strong { font-size: .95rem; color: var(--navy); }
.rpt-sec { margin-bottom: 30px; }
.rpt-sec h2 {
  font-size: 1.05rem; color: var(--navy); border-bottom: 1px solid var(--grid);
  padding-bottom: 6px; margin: 0 0 14px; letter-spacing: .2px;
}
.rpt-exec { font-size: 1.02rem; line-height: 1.65; color: #26314a; background: #f6f8fc; border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.rpt-tiles { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .rpt-tiles { grid-template-columns: repeat(3, 1fr); } }
.rpt-cat { font-size: .92rem; color: #33415e; margin: 18px 0 6px; }
.rpt-tbl td { font-size: .9rem; }
.rpt-outcome { color: var(--good-text); font-size: .88rem; font-weight: 600; margin-top: 2px; }
.rpt-outcomes { margin: 0; padding-left: 20px; }
.rpt-outcomes li { margin-bottom: 8px; line-height: 1.5; }
.rpt-foot { border-top: 1px solid var(--grid); padding-top: 14px; font-size: .82rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
@media print {
  .noprint { display: none !important; }
  .report-body { background: #fff; }
  .rpt { box-shadow: none; border: none; margin: 0; padding: 10px 0; max-width: none; border-radius: 0; }
  .rpt-sec { break-inside: auto; }
  .rpt-sec h2 { break-after: avoid; }
  .card { box-shadow: none; }
}

/* monthbar controls stay inline, not full-width */
.monthbar select, .monthbar input[type=month] { width: auto; max-width: 210px; }

/* ---- report period switcher ---- */
.pbar { margin-top: 6px; }
.pseg {
  display: inline-flex; background: #fff; border: 1px solid var(--baseline);
  border-radius: 999px; padding: 3px; gap: 2px; box-shadow: 0 2px 8px rgba(15,27,51,.08);
}
.pseg a { padding: 7px 15px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.pseg a:hover { background: #eef3fb; }
.pseg a.on { background: linear-gradient(135deg, #2a78d6, #1c5cab); color: #fff; box-shadow: 0 2px 6px rgba(42,120,214,.4); }
.pchips { display: inline-flex; gap: 4px; align-items: center; }
.pchip {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--baseline);
  background: #fff; color: var(--ink-2); text-decoration: none; font-size: .82rem; font-weight: 700;
}
.pchip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pchip.pyear { border: none; background: transparent; color: var(--muted); }

/* ---- 3D range picker ---- */
.rp-backdrop {
  position: fixed; inset: 0; background: rgba(11,21,38,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 90; padding: 14px;
  perspective: 1200px;
}
.rp-backdrop.open { display: flex; }
.rp {
  width: 680px; max-width: 100%; max-height: 92vh; overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
  border-radius: 20px;
  box-shadow: 0 40px 80px rgba(4,10,24,.5), 0 12px 28px rgba(4,10,24,.35), inset 0 1px 0 rgba(255,255,255,.9);
  transform-origin: 50% 0%;
  animation: rpIn .45s cubic-bezier(.2,.9,.25,1.15);
}
@keyframes rpIn {
  from { transform: rotateX(-24deg) translateY(-30px) scale(.94); opacity: 0; }
  to   { transform: rotateX(0) translateY(0) scale(1); opacity: 1; }
}
.rp-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: linear-gradient(135deg, #0f1b33, #24407a);
  border-radius: 20px 20px 0 0; color: #fff; position: sticky; top: 0; z-index: 2;
  box-shadow: 0 4px 14px rgba(4,10,24,.35);
}
.rp-title { font-weight: 700; letter-spacing: .3px; }
.rp-sel { margin-left: auto; font-size: .85rem; color: #cdd9f2; font-variant-numeric: tabular-nums; }
.rp-x { background: rgba(255,255,255,.12); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: .85rem; }
.rp-x:hover { background: rgba(255,255,255,.25); }
.rp-body { display: flex; gap: 14px; padding: 16px; }
.rp-presets { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.rp-presets button {
  border: 1px solid var(--grid); background: #fff; border-radius: 10px; padding: 8px 12px;
  font-size: .82rem; color: var(--ink-2); cursor: pointer; text-align: left; font-family: inherit;
  box-shadow: 0 1px 3px rgba(15,27,51,.08);
  transition: transform .12s, box-shadow .12s;
}
.rp-presets button:hover { transform: translateX(2px) translateY(-1px); box-shadow: 0 4px 10px rgba(15,27,51,.15); color: var(--accent-deep); border-color: var(--accent); }
.rp-cals { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.rp-cal {
  flex: 1; min-width: 220px; background: #fff; border-radius: 14px; padding: 12px;
  box-shadow: 0 8px 24px rgba(15,27,51,.12), inset 0 1px 0 #fff;
  border: 1px solid rgba(11,11,11,.06);
}
.rp-mname { font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 8px; letter-spacing: .3px; }
.rp-dow { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: .68rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.rp-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.rp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; border-radius: 9px; cursor: pointer; color: var(--ink);
  background: #f7f8fa; box-shadow: 0 1px 2px rgba(15,27,51,.10), inset 0 1px 0 #fff;
  transition: transform .1s, box-shadow .1s, background .1s;
  user-select: none;
}
.rp-day:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(42,120,214,.28); background: #eef3fb; }
.rp-void { background: transparent; box-shadow: none; cursor: default; }
.rp-void:hover { transform: none; box-shadow: none; }
.rp-today { outline: 2px solid var(--gold); outline-offset: -2px; font-weight: 700; }
.rp-in { background: linear-gradient(180deg, #dcebfc, #cfe3fa); color: var(--accent-deep); box-shadow: inset 0 1px 2px rgba(42,120,214,.25); }
.rp-end {
  background: linear-gradient(135deg, #2a78d6, #1c5cab); color: #fff; font-weight: 700;
  box-shadow: 0 6px 14px rgba(42,120,214,.5), inset 0 1px 0 rgba(255,255,255,.35);
  transform: translateY(-1px);
}
.rp-foot { display: flex; gap: 8px; padding: 12px 16px 16px; align-items: center; }
@media (max-width: 640px) { .rp-body { flex-direction: column; } .rp-presets { flex-direction: row; flex-wrap: wrap; } }

/* ============================================================
   v3 — vibrant KPI cards, event modal, attendee chips, tables
   ============================================================ */
.period-label { margin: -6px 0 14px; font-size: .9rem; color: var(--ink-2); }

/* colorful clickable KPI cards */
.ktiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 560px) { .ktiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .ktiles { grid-template-columns: repeat(5, 1fr); } }
.ktile {
  position: relative; display: block; text-decoration: none; color: inherit;
  border-radius: 14px; padding: 14px 14px 12px; overflow: hidden;
  border: 1px solid rgba(11,11,11,.06);
  box-shadow: 0 2px 6px rgba(15,27,51,.08);
  transition: transform .14s, box-shadow .14s;
  background: #fff;
}
a.ktile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,27,51,.16); }
.ktile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.ktile .k-ico { font-size: 1.35rem; }
.ktile .k-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; color: var(--navy); }
.ktile .k-lbl { font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-top: 1px; }
.ktile .k-open { font-size: .7rem; color: var(--accent-deep); font-weight: 700; margin-top: 6px; opacity: 0; transition: opacity .14s; }
a.ktile:hover .k-open { opacity: 1; }
.c-blue::before   { background: linear-gradient(90deg,#2a78d6,#6da7ec); } .c-blue   { background: linear-gradient(180deg,#fdfefe,#f2f7fd); }
.c-navy::before   { background: linear-gradient(90deg,#0f1b33,#24407a); } .c-navy   { background: linear-gradient(180deg,#fdfefe,#f0f2f8); }
.c-red::before    { background: linear-gradient(90deg,#e34948,#ef8281); } .c-red    { background: linear-gradient(180deg,#fffdfd,#fdf1f1); }
.c-teal::before   { background: linear-gradient(90deg,#1baf7a,#5ecfa4); } .c-teal   { background: linear-gradient(180deg,#fdfffe,#effaf5); }
.c-violet::before { background: linear-gradient(90deg,#4a3aa7,#8d81d9); } .c-violet { background: linear-gradient(180deg,#fefdff,#f3f1fb); }
.c-orange::before { background: linear-gradient(90deg,#eb6834,#f39a72); } .c-orange { background: linear-gradient(180deg,#fffefd,#fdf3ee); }
.c-pink::before   { background: linear-gradient(90deg,#e87ba4,#f2a9c4); } .c-pink   { background: linear-gradient(180deg,#fffdfe,#fcf1f6); }
.c-gold::before   { background: linear-gradient(90deg,#c9a227,#e0c264); } .c-gold   { background: linear-gradient(180deg,#fffefb,#fbf6e8); }
.c-slate::before  { background: linear-gradient(90deg,#52514e,#8a8985); } .c-slate  { background: linear-gradient(180deg,#fefefe,#f3f3f2); }

/* attendee chips */
.att-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.att-chip {
  border: 1px solid var(--baseline); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: .78rem; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.att-chip:hover { border-color: var(--accent); color: var(--accent-deep); background: #eef3fb; }

/* event details modal */
.ev-backdrop {
  position: fixed; inset: 0; background: rgba(11,21,38,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 85; padding: 14px;
}
.ev-backdrop.open { display: flex; }
.ev-modal {
  width: 480px; max-width: 100%; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 18px;
  box-shadow: 0 30px 70px rgba(4,10,24,.5);
  animation: rpIn .35s cubic-bezier(.2,.9,.25,1.1);
}
.ev-head {
  display: flex; gap: 12px; align-items: center; padding: 16px 18px;
  background: linear-gradient(135deg, #0f1b33, #24407a); color: #fff;
  border-radius: 18px 18px 0 0;
}
.ev-ico { font-size: 1.6rem; }
.ev-title { font-weight: 700; line-height: 1.3; }
.ev-sub { font-size: .8rem; color: #b9c6e2; }
.ev-head .rp-x { margin-left: auto; flex: 0 0 auto; }
.ev-body { padding: 14px 18px; }
.ev-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: .92rem; }
.ev-row:last-child { border-bottom: none; }
.ev-row span { flex: 0 0 110px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; padding-top: 2px; }
.ev-row strong { font-weight: 500; color: var(--ink); white-space: pre-line; }
.ev-foot { display: flex; gap: 8px; align-items: center; padding: 12px 18px 16px; }
.cal-chip { width: 100%; text-align: left; border: 1px solid transparent; font-family: inherit; cursor: pointer; }

/* activities table */
.catbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.actfilters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.actfilters input[type=text], .actfilters select { width: auto; }
.tbl th a { color: var(--muted); text-decoration: none; }
.tbl th a:hover { color: var(--accent-deep); }

/* ============================================================
   v3b — themes, avatars, branding
   ============================================================ */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { max-height: 30px; border-radius: 6px; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.avatar-sm { width: 32px; height: 32px; font-size: .9rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 2rem; flex: 0 0 auto; }
.avatar-ph { background: linear-gradient(135deg, #2a78d6, #1c5cab); color: #fff; font-weight: 700; }
.nav-me { padding: 2px !important; border-radius: 50% !important; }
.client-logo { max-height: 46px; max-width: 130px; border-radius: 8px; object-fit: contain; }

/* theme picker */
.themegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 560px; }
.themecard { display: block; cursor: pointer; border: 2px solid var(--grid); border-radius: 14px; overflow: hidden; text-align: center; padding-bottom: 8px; font-weight: 600; transition: transform .12s, box-shadow .12s; }
.themecard:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,27,51,.15); }
.themecard.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42,120,214,.2); }
.themecard input { position: absolute; opacity: 0; }
.th-prev { display: block; height: 58px; }
.th-name { font-size: .85rem; color: var(--ink-2); display: block; margin-top: 8px; }

/* ---- themes: chrome only, data colors unchanged ---- */
.theme-ocean .topbar { background: linear-gradient(135deg, #0b3d78, #1c66c2); border-bottom-color: #7db8f0; }
.theme-ocean .rp-head, .theme-ocean .ev-head { background: linear-gradient(135deg, #0b3d78, #1c66c2); }
.theme-ocean .c-navy::before { background: linear-gradient(90deg, #0b3d78, #1c66c2); }

.theme-forest .topbar { background: linear-gradient(135deg, #0d3d2b, #14684a); border-bottom-color: #7ccfa9; }
.theme-forest .rp-head, .theme-forest .ev-head { background: linear-gradient(135deg, #0d3d2b, #14684a); }
.theme-forest { --accent: #0e7a4d; --accent-deep: #0a5c3a; }
.theme-forest .nav a.nav-log, .theme-forest .btn { background: var(--accent); }
.theme-forest .btn:hover { background: var(--accent-deep); }
.theme-forest .btn-ghost { background: transparent; color: var(--accent-deep); }
.theme-forest .pseg a.on { background: linear-gradient(135deg, #0e7a4d, #0a5c3a); box-shadow: 0 2px 6px rgba(14,122,77,.4); }

/* ============================================================
   v4 — donuts, tick-to-done, clickable overview tiles
   ============================================================ */
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut { width: 180px; height: 180px; flex: 0 0 auto; }
.d-total { font-size: 26px; font-weight: 800; fill: var(--navy); }
.d-unit { font-size: 11px; fill: var(--muted); }
.donut-legend { flex: 1; min-width: 220px; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: .92rem; }
.dl-row:last-child { border-bottom: none; }
.dl-dot { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.dl-name { flex: 1; font-weight: 600; color: var(--ink); }
.dl-val { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dl-val b { color: var(--navy); }

.tile-link { text-decoration: none; color: inherit; transition: transform .14s, box-shadow .14s; }
.tile-link:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,27,51,.16); }
.tile-link .k-open { font-size: .7rem; color: var(--accent-deep); font-weight: 700; margin-top: 6px; opacity: 0; transition: opacity .14s; }
.tile-link:hover .k-open { opacity: 1; }

.btn-tick {
  border: 1px solid #bfe3bf; background: #eaf6ea; color: var(--good-text);
  border-radius: 8px; padding: 4px 12px; font-size: .8rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn-tick:hover { background: var(--good-text); color: #fff; }
.up-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.split-panel { padding-top: 8px; }
.pchip.split-tab { cursor: pointer; font-family: inherit; }

/* ============================================================
   v5 — quarterly invoicing, payment banners, social links,
        single-date calendar picker
   ============================================================ */

/* ---- payment / invoice banners ---- */
.bb-stack { margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.bb {
  display: block; padding: 12px 16px; border-radius: 12px; font-size: .95rem;
  border: 1px solid; line-height: 1.5;
}
.bb .bb-sub { color: inherit; opacity: .85; font-size: .88rem; }
.bb .bb-link { font-weight: 700; text-decoration: none; margin-left: 8px; white-space: nowrap; }
.bb-due {
  background: linear-gradient(180deg, #fdf0f0, #fbe7e7); border-color: #f0c2c2; color: #7c1d1d;
  border-left: 5px solid #d03b3b;
}
.bb-due .bb-link { color: #a12525; }
.bb-warn {
  background: linear-gradient(180deg, #fdf8ec, #fbf2dd); border-color: #ecd9a8; color: #6d4a00;
  border-left: 5px solid #d8a012;
}
.bb-warn .bb-link { color: #8a5a00; }
.bb-ok {
  background: linear-gradient(180deg, #eef8ee, #e4f4e4); border-color: #bfe3bf; color: #1d5c1d;
  border-left: 5px solid #2e8b2e;
}
.bb-ok .bb-link { color: var(--good-text); }
.bb-next {
  background: linear-gradient(180deg, #eff5fd, #e6effb); border-color: #c9dcf5; color: #1c477e;
  border-left: 5px solid #2a78d6;
}
.bb-next .bb-link { color: var(--accent-deep); }
a.bb-rowlink { text-decoration: none; transition: transform .12s, box-shadow .12s; }
a.bb-rowlink:hover { transform: translateX(2px); box-shadow: 0 4px 12px rgba(15,27,51,.12); }
.bb-card h2 { margin-bottom: 10px; }
.bb-card .bb { margin-bottom: 8px; }
.bb-card .bb:last-child { margin-bottom: 0; }
.pill.p-due { background: #fbe7e7; color: #a12525; font-weight: 700; }

/* ---- invoices page ---- */
.inv-qnav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.inv-qnav .m-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 1rem;
}
.inv-qtitle { flex: 1; }
.inv-qtitle strong { font-size: 1.15rem; color: var(--navy); }
.inv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 8px 0 4px; }
@media (min-width: 700px) { .inv-stats { grid-template-columns: repeat(4, 1fr); } }
.inv-stats .t-num { font-size: 1.35rem; }

/* ---- social / website links ---- */
.soc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; margin-top: 2px; }
.soc {
  --soc: #33415e;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--soc); background: #fff; border: 1.5px solid currentColor;
  text-decoration: none; transition: transform .13s, box-shadow .13s, background .13s, color .13s;
  box-shadow: 0 1px 3px rgba(15,27,51,.10);
}
.soc:hover { background: var(--soc); color: #fff; border-color: var(--soc); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15,27,51,.22); }
.soc svg { display: block; }
.soc.soc-site { width: auto; border-radius: 999px; padding: 0 14px 0 11px; font-size: .82rem; font-weight: 700; color: var(--navy); }
.soc.soc-site:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.soc.soc-site span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print { .soc-row { display: none; } }

/* ---- single-date picker ---- */
.dp-wrap { width: 100%; }
.dp-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border: 1px solid var(--baseline); border-radius: 10px;
  background: var(--surface); color: var(--muted); font-size: 1rem; font-family: inherit;
  cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s;
}
.dp-btn:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(42,120,214,.18); }
.dp-btn.has-val { color: var(--ink); font-weight: 600; }
.dp-btn .dp-ico { font-size: 1.05rem; }
.dp-pop { width: 360px; }
.dp-pop .rp-cal { margin: 0 16px 4px; }
.dp-nav { display: flex; gap: 8px; align-items: center; padding: 14px 16px 10px; }
.dp-nav select {
  flex: 1; height: 38px; border-radius: 10px; border: 1px solid var(--baseline);
  background: #fff; padding: 0 8px; font-size: .92rem; font-family: inherit; width: auto;
}
