/* ─────────────────────────────────────────────────────────────────────────────
   Clean Calendar (v094) — styles for js/calendar-clean.js
   Uses the app's theme tokens (--card, --ink, --muted, --line, --brand2) so it
   follows every theme in light and dark. Status colours come from
   workStatusColor() and are set per chip as --st.
   ───────────────────────────────────────────────────────────────────────────── */
html body .cc-wrap{
  --cc-cell: color-mix(in srgb, var(--ink) 4.5%, var(--card));
  --cc-cell-h: color-mix(in srgb, var(--ink) 7.5%, var(--card));
  --cc-r: 22px;
  display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:20px; align-items:start;
}
html body .cc-card, html body .cc-side-card{
  background:var(--card); border:1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius:var(--cc-r); box-shadow:0 1px 2px rgba(0,0,0,.03);
}
html body .cc-card{ padding:20px 20px 16px; min-width:0; }
html body .cc-wrap > *, html body .cc-side > *, html body .cc-list > *{ min-width:0; }
html body .cc-item{ max-width:100%; }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
html body .cc-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px 16px; flex-wrap:wrap; margin-bottom:16px; }
html body .cc-nav{ display:flex; align-items:center; gap:10px; }
html body .cc-tools{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
html body .cc-label{ margin:0; font-size:22px; font-weight:500!important; letter-spacing:-.02em; color:var(--ink); min-width:168px; text-align:center; }
html body .cc-round{
  width:36px; height:36px; border-radius:50%; border:none; cursor:pointer; display:inline-grid; place-items:center;
  background:var(--cc-cell); color:var(--ink); transition:background .15s;
}
html body .cc-round:hover{ background:var(--cc-cell-h); }
html body .cc-round svg{ width:15px; height:15px; }
html body .cc-today{
  height:36px; padding:0 15px; border-radius:999px; border:1px solid var(--line); background:var(--card);
  color:var(--ink); font-size:13px; font-weight:500; cursor:pointer;
}
html body .cc-today:hover{ background:var(--cc-cell); }
html body .cc-search{
  display:flex; align-items:center; gap:8px; height:38px; padding:0 14px; border-radius:999px;
  background:var(--cc-cell); color:var(--muted); min-width:200px; cursor:text;
}
html body .cc-search svg{ width:14px; height:14px; flex:none; }
html body .cc-search input{
  border:none!important; outline:none!important; background:transparent!important; box-shadow:none!important;
  padding:0!important; font-size:13.5px; color:var(--ink); width:100%; min-width:0; border-radius:0!important;
}
html body .cc-search:focus-within{ box-shadow:0 0 0 2px color-mix(in srgb, var(--brand2) 35%, transparent); }
html body .cc-seg{ display:inline-flex; padding:3px; border-radius:999px; background:var(--cc-cell); }
html body .cc-seg button{
  border:none; background:transparent; height:32px; padding:0 13px; border-radius:999px; cursor:pointer;
  font-size:12.5px; font-weight:500; color:var(--muted);
}
html body .cc-seg button.on{ background:var(--card); color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.12); }

/* ── Month / week grid ───────────────────────────────────────────────────── */
html body .cc-dow{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-bottom:6px; }
html body .cc-dow span{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding-left:6px; }
html body .cc-grid{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; }
html body .cc-day{
  position:relative; min-height:108px; padding:8px 7px 7px; border-radius:15px; background:var(--cc-cell);
  display:flex; flex-direction:column; gap:5px; min-width:0; cursor:pointer;
  transition:background .15s, box-shadow .15s; outline:none;
}
html body .cc-day:hover{ background:var(--cc-cell-h); }
html body .cc-day.is-blank{ background:transparent; cursor:default; }
html body .cc-day.is-today{ background:var(--card); box-shadow:inset 0 0 0 1.5px var(--ink); }
html body .cc-day.is-sel:not(.is-today){ box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--brand2) 70%, transparent); background:var(--card); }
html body .cc-day.is-today.is-sel{ box-shadow:inset 0 0 0 1.5px var(--ink), 0 0 0 3px color-mix(in srgb, var(--brand2) 22%, transparent); }
html body .cc-day.drop-hl{ box-shadow:inset 0 0 0 2px var(--brand2)!important; background:color-mix(in srgb, var(--brand2) 8%, var(--card)); }

html body .cc-dh{ display:flex; align-items:center; gap:6px; min-height:22px; padding:0 2px; }
html body .cc-dn{ font-size:14px; font-weight:500; color:var(--ink); font-variant-numeric:tabular-nums; }
html body .cc-dn small{ font-size:11px; color:var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:.06em; }
html body .cc-day.is-today .cc-dn{ color:var(--brand2); font-weight:600; }
html body .cc-cnt{
  margin-left:auto; min-width:20px; height:20px; padding:0 6px; border-radius:999px; display:inline-grid; place-items:center;
  font-size:11px; font-weight:600; color:var(--muted); background:color-mix(in srgb, var(--ink) 7%, transparent);
}
html body .cc-day.is-today .cc-cnt{ background:var(--ink); color:var(--card); }
html body .cc-add{
  width:22px; height:22px; border-radius:50%; border:none; padding:0; display:none; place-items:center; cursor:pointer;
  background:var(--ink); color:var(--card); flex:none;
}
html body .cc-day:not(.is-blank) .cc-cnt + .cc-add{ margin-left:0; }
html body .cc-day:not(.is-blank) .cc-add{ margin-left:auto; }
html body .cc-day:not(.is-blank) .cc-cnt ~ .cc-add{ margin-left:0; }
html body .cc-add svg{ width:11px; height:11px; }
@media (hover:hover){ html body .cc-day:not(.is-blank):hover .cc-add{ display:inline-grid; } }

html body .cc-chips{ display:flex; flex-direction:column; gap:4px; min-width:0; }
html body .cc-chip{
  display:flex; align-items:center; gap:6px; height:25px; padding:0 8px; border-radius:8px; min-width:0;
  background:var(--st); color:#fff; font-size:11.5px; font-weight:500; line-height:1.2; cursor:grab;
  transition:transform .12s, box-shadow .12s, filter .12s;
}
html body .cc-chip:hover{ transform:translateY(-1px); box-shadow:0 4px 10px -4px color-mix(in srgb, var(--st) 70%, transparent); filter:brightness(1.06); }
html body .cc-chip.dragging{ opacity:.45; }
html body .cc-ic{ display:inline-grid; place-items:center; flex:none; opacity:.95; }
html body .cc-ic svg{ width:12px; height:12px; }
html body .cc-ct{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
html body .cc-chip.big{ height:auto; min-height:44px; padding:7px 9px; align-items:flex-start; border-radius:10px; }
html body .cc-chip.big .cc-ic{ margin-top:2px; }
html body .cc-chip.big .cc-ct{ white-space:normal; display:flex; flex-direction:column; gap:2px; }
html body .cc-chip.big .cc-ct b{ font-weight:500; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
html body .cc-chip.big .cc-ct small{ font-size:10.5px; opacity:.85; }
html body .cc-more{
  border:none; background:transparent; color:var(--muted); font-size:11.5px; font-weight:500; text-align:left;
  padding:2px 4px; cursor:pointer; border-radius:6px;
}
html body .cc-more:hover{ color:var(--ink); background:color-mix(in srgb, var(--ink) 6%, transparent); }
html body .cc-dots{ display:none; }
html body .cc-week .cc-day{ min-height:380px; }

html body .cc-found{ font-size:12.5px; color:var(--muted); margin:-4px 0 10px; }

/* ── Year ────────────────────────────────────────────────────────────────── */
html body .cc-year{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
html body .cc-ym{ background:var(--cc-cell); border-radius:16px; padding:12px 12px 10px; }
html body .cc-ym.is-cur{ background:var(--card); box-shadow:inset 0 0 0 1.5px var(--ink); }
html body .cc-ymh{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
html body .cc-ymh b{ font-size:14px; font-weight:600; color:var(--ink); cursor:pointer; }
html body .cc-ymh b:hover{ color:var(--brand2); }
html body .cc-ymh span{ font-size:11px; font-weight:600; color:var(--muted); background:color-mix(in srgb, var(--ink) 7%, transparent); padding:2px 8px; border-radius:999px; }
html body .cc-ydow, html body .cc-ygrid{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
html body .cc-ydow span{ font-size:10px; color:var(--muted); text-align:center; font-weight:600; }
html body .cc-yd{
  position:relative; aspect-ratio:1; border:none; background:transparent; border-radius:8px; font-size:11.5px;
  color:var(--muted); cursor:pointer; padding:0; display:grid; place-items:center; font-variant-numeric:tabular-nums;
}
html body .cc-yd.blank{ cursor:default; }
html body .cc-yd.has{ color:var(--ink); font-weight:600; }
html body .cc-yd i{ position:absolute; bottom:3px; left:50%; width:5px; height:5px; margin-left:-2.5px; border-radius:50%; }
html body .cc-yd:not(.blank):hover{ background:color-mix(in srgb, var(--ink) 8%, transparent); }
html body .cc-yd.is-today{ background:var(--ink); color:var(--card); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
html body .cc-foot{ display:flex; align-items:center; justify-content:space-between; gap:8px 18px; flex-wrap:wrap; margin-top:16px; }
html body .cc-legend{ display:flex; flex-wrap:wrap; gap:6px 14px; }
html body .cc-legend span{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); }
html body .cc-legend i{ width:9px; height:9px; border-radius:50%; }
html body .cc-hint{ font-size:11.5px; color:var(--muted); opacity:.85; }

/* ── Side panel ──────────────────────────────────────────────────────────── */
html body .cc-side{ display:flex; flex-direction:column; gap:16px; position:sticky; top:84px; }
html body .cc-side-card{ padding:20px; }
html body .cc-eyebrow{ font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
html body .cc-side-date{ margin:4px 0 14px; font-size:24px; font-weight:500!important; letter-spacing:-.02em; color:var(--ink); }
html body .cc-side-h{ margin:0 0 12px; font-size:19px; font-weight:500!important; letter-spacing:-.015em; color:var(--ink); }
html body .cc-list{ display:flex; flex-direction:column; gap:8px; }
html body .cc-item{
  display:flex; align-items:center; gap:12px; width:100%; text-align:left; cursor:pointer; border:none;
  background:var(--cc-cell); border-radius:14px; padding:11px 12px 11px 14px; position:relative; overflow:hidden;
  transition:background .15s;
}
html body .cc-item::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--st); }
html body .cc-item:hover{ background:var(--cc-cell-h); }
html body .cc-tile{
  flex:none; width:44px; height:48px; border-radius:11px; background:var(--card); display:flex; flex-direction:column;
  align-items:center; justify-content:center; line-height:1;
}
html body .cc-tile small{ font-size:9.5px; font-weight:600; letter-spacing:.08em; color:var(--muted); }
html body .cc-tile b{ font-size:19px; font-weight:500; color:var(--ink); margin-top:3px; }
html body .cc-ib{ display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
html body .cc-it{ font-size:13.5px; font-weight:500; color:var(--ink); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
html body .cc-im{ font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html body .cc-st{
  flex:none; display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--ink);
  background:color-mix(in srgb, var(--sc, var(--st)) 13%, var(--card)); padding:4px 9px; border-radius:999px; white-space:nowrap; align-self:flex-start;
}
html body .cc-st i{ width:7px; height:7px; border-radius:50%; background:var(--sc, var(--st)); }
html body .cc-none{ font-size:13px; color:var(--muted); padding:14px; border-radius:14px; background:var(--cc-cell); text-align:center; }
html body .cc-addday{
  margin-top:12px; width:100%; height:44px; border-radius:999px; border:1px solid var(--line); background:var(--card);
  color:var(--ink); font-size:13.5px; font-weight:500; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:7px;
}
html body .cc-addday svg{ width:13px; height:13px; }
html body .cc-addday:hover{ background:var(--cc-cell); }

/* ── Main calendar: every client's tasks + posts ──────────────────────────── */
html body .cc-filters{ display:flex; align-items:center; justify-content:space-between; gap:10px 16px; flex-wrap:wrap; margin:-4px 0 14px; }
html body .cc-colorby{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
html body .cc-seg.sm button{ height:28px; padding:0 12px; font-size:12px; }
/* Client name inside a chip */
html body .cc-cl{
  font-size:9.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-right:5px; opacity:.92;
}
html body .cc-clb{ font-size:9.5px!important; font-weight:700; letter-spacing:.04em; text-transform:uppercase; opacity:.92!important; }
html body .cc-chip.two{ height:auto; min-height:36px; padding:5px 8px; align-items:flex-start; position:relative; }
html body .cc-chip.two .cc-ic{ margin-top:1px; }
html body .cc-ct.cc-two{ display:flex; flex-direction:column; gap:1px; white-space:normal; padding-right:10px; }
html body .cc-two .cc-cl{ margin:0; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html body .cc-two .cc-tt{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.3; }
html body .cc-chip.two .cc-sd{ position:absolute; top:7px; right:7px; }
/* Small status dot at the end of a chip (when colouring by client) */
html body .cc-sd{ flex:none; width:8px; height:8px; border-radius:50%; margin-left:auto; box-shadow:0 0 0 1.5px #fff; }
/* Posts: light tint of the colour with a solid edge, so they read differently from tasks */
html body .cc-chip.is-post{
  background:color-mix(in srgb, var(--st) 15%, var(--card)); color:var(--ink);
  box-shadow:inset 3px 0 0 var(--st);
}
html body .cc-chip.is-post .cc-ic{ color:var(--st); }
html body .cc-chip.is-post .cc-cl, html body .cc-chip.is-post .cc-clb{ color:var(--st); opacity:1!important; }
html body .cc-chip.is-post .cc-sd{ box-shadow:0 0 0 1.5px var(--card); }
html body .cc-chip.is-post:hover{ filter:none; background:color-mix(in srgb, var(--st) 22%, var(--card)); }
html body.dark .cc-chip.is-post{ background:color-mix(in srgb, var(--st) 30%, var(--card)); }
html body.dark .cc-chip.is-post .cc-ic, html body.dark .cc-chip.is-post .cc-cl, html body.dark .cc-chip.is-post .cc-clb{ color:color-mix(in srgb, var(--st) 45%, #fff); }
/* Client tag in the side panel */
html body .cc-ctag{
  align-self:flex-start; white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--cc); background:color-mix(in srgb, var(--cc) 13%, var(--card)); padding:2px 8px; border-radius:999px;
}
html body.dark .cc-ctag{ color:color-mix(in srgb, var(--cc) 45%, #fff); background:color-mix(in srgb, var(--cc) 28%, var(--card)); }
html body .cc-addrow{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
html body .cc-addrow .cc-addday{ margin-top:12px; }
/* Footer key */
html body .cc-legend-slot{ display:flex; flex-direction:column; gap:10px; width:100%; }
html body .cc-key{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
html body .cc-key-h{ font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-right:4px; }
html body .cc-cchip{
  display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border-radius:999px; cursor:pointer;
  border:1px solid color-mix(in srgb, var(--cc) 30%, var(--line)); background:color-mix(in srgb, var(--cc) 8%, var(--card));
  color:var(--ink); font-size:12px; font-weight:500; transition:opacity .15s, background .15s;
}
html body .cc-cchip i{ width:9px; height:9px; border-radius:50%; background:var(--cc); }
html body .cc-cchip b{ font-size:10.5px; font-weight:600; color:var(--muted); }
html body .cc-cchip:hover{ background:color-mix(in srgb, var(--cc) 15%, var(--card)); }
html body .cc-cchip.off{ opacity:.45; text-decoration:line-through; background:transparent; }
html body .cc-cchip.reset{ --cc:var(--ink); background:transparent; text-decoration:underline; border-color:transparent; color:var(--muted); }
html body .cc-kind i{ width:16px!important; height:10px!important; border-radius:3px!important; background:#64748B; }
html body .cc-kind i.tint{ background:color-mix(in srgb, #64748B 18%, var(--card)); box-shadow:inset 3px 0 0 #64748B; }

/* ── Dark mode touch-ups ─────────────────────────────────────────────────── */
html body.dark .cc-wrap{
  --cc-cell: color-mix(in srgb, var(--ink) 6%, var(--card));
  --cc-cell-h: color-mix(in srgb, var(--ink) 10%, var(--card));
}
html body.dark .cc-seg button.on{ background:color-mix(in srgb, var(--ink) 14%, var(--card)); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width:1180px){
  html body .cc-wrap{ grid-template-columns:minmax(0,1fr); }
  html body .cc-side{ position:static; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; }
}
@media (max-width:820px){
  html body .cc-side{ grid-template-columns:minmax(0,1fr); }
  html body .cc-day{ min-height:92px; }
  html body .cc-chip{ height:22px; padding:0 6px; font-size:11px; gap:4px; }
  html body .cc-ic svg{ width:11px; height:11px; }
  html body .cc-hint{ display:none; }
}
/* Phones: dots instead of chips; the day's details live in the panel below. */
@media (max-width:640px){
  html body .cc-card{ padding:14px 12px 12px; }
  html body .cc-wrap{ --cc-r:18px; gap:14px; }
  html body .cc-bar{ gap:10px; }
  html body .cc-nav{ width:100%; justify-content:space-between; }
  html body .cc-label{ font-size:18px; min-width:0; flex:1; }
  html body .cc-tools{ width:100%; flex-direction:column; align-items:stretch; gap:8px; }
  html body .cc-search{ width:100%; min-width:0; }
  html body .cc-seg{ display:flex; }
  html body .cc-seg button{ flex:1; padding:0 8px; }
  html body .cc-item{ padding:10px 10px 10px 13px; gap:10px; flex-wrap:wrap; }
  html body .cc-st{ order:3; margin-left:auto; }
  html body .cc-dow, html body .cc-grid{ gap:4px; }
  html body .cc-dow span{ padding-left:0; text-align:center; font-size:10px; letter-spacing:.04em; }
  html body .cc-day{ min-height:56px; padding:6px 3px 5px; border-radius:11px; align-items:center; gap:4px; }
  html body .cc-dh{ justify-content:center; padding:0; min-height:18px; }
  html body .cc-dn{ font-size:13px; }
  html body .cc-cnt, html body .cc-add, html body .cc-chips{ display:none!important; }
  html body .cc-dots{ display:flex; flex-wrap:wrap; justify-content:center; gap:3px; align-items:center; }
  html body .cc-dots i{ width:6px; height:6px; border-radius:50%; }
  html body .cc-dots em{ font-style:normal; font-size:9px; font-weight:600; color:var(--muted); }
  html body .cc-week .cc-day{ min-height:80px; }
  html body .cc-year{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
  html body .cc-ym{ padding:10px 8px 8px; }
  html body .cc-yd{ font-size:10.5px; border-radius:6px; }
  html body .cc-side-card{ padding:16px; }
  html body .cc-side-date{ font-size:21px; }
  html body .cc-legend span{ font-size:11px; }
  html body .cc-filters{ margin-top:0; }
  html body .cc-cchip{ height:26px; font-size:11.5px; }
}
@media (max-width:360px){
  html body .cc-label{ font-size:16px; white-space:nowrap; }
  html body .cc-nav{ gap:6px; }
  html body .cc-today{ padding:0 12px; }
  html body .cc-seg button{ padding:0 8px; font-size:12px; }
  html body .cc-search{ min-width:0; }
}
