/* Scheduler (#/schedule) + nudges (#/nudges) feature styles. Uses app.css variables.
   Status hexes mirror app.css .s-* — two-class selectors keep them cascade-order safe. */

/* ---- week strip ---- */
.sched-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; scrollbar-width: none; position: sticky; top: -14px; z-index: 10; background: var(--bg); }
.sched-strip::-webkit-scrollbar { display: none; }
.sched-day {
  flex-shrink: 0; min-width: 46px; min-height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 4px;
  font: inherit; color: var(--ink); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.sd-dow { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); }
.sd-num { font-size: 16px; font-weight: 700; line-height: 1; }
.sd-dot { width: 7px; height: 7px; border-radius: 50%; }
.sched-day.is-today .sd-dow { color: var(--accent); }
.sched-day.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sched-day.on .sd-dow { color: rgba(255, 255, 255, 0.75); }
.sched-day.on.is-today .sd-dow { color: #7dd3c8; }

/* drop targets while a row is lifted */
.sched-strip.dropping .sched-day { border-color: var(--accent); }
.sched-day.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); transform: scale(1.06); }

/* ---- full-month calendar ---- */
.cal { margin-bottom: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-size: 16px; font-weight: 700; }
.cal-dow-row, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow-row { margin-bottom: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.cal-cell {
  min-height: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px;
  font: inherit; color: var(--ink); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
}
.cal-num { font-size: 14px; font-weight: 600; line-height: 1.1; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; min-height: 5px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; color: var(--accent); }
.cal-dot.s-lead { color: #6d28d9; } .cal-dot.s-estimating { color: #b45309; } .cal-dot.s-quoted { color: #0369a1; }
.cal-dot.s-scheduled { color: #047857; } .cal-dot.s-in_progress { color: #b91c1c; } .cal-dot.s-done { color: #334155; } .cal-dot.s-paid { color: #15803d; }
.cal-cell.other { opacity: 0.42; }
.cal-cell.other .cal-num { font-weight: 400; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.today .cal-num { color: var(--accent); }
.cal-cell.sel { background: var(--ink); border-color: var(--ink); }
.cal-cell.sel .cal-num { color: #fff; }
.cal.dropping .cal-cell { border-color: var(--accent); }
.cal-cell.drop-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

/* ---- status colors (mirror app.css .s-*; dot/bar paint with currentColor) ---- */
.sd-dot, .sched-bar { background: currentColor; color: var(--accent); }
.sd-dot.s-lead, .sched-bar.s-lead { color: #6d28d9; }
.sd-dot.s-estimating, .sched-bar.s-estimating { color: #b45309; }
.sd-dot.s-quoted, .sched-bar.s-quoted { color: #0369a1; }
.sd-dot.s-scheduled, .sched-bar.s-scheduled { color: #047857; }
.sd-dot.s-in_progress, .sched-bar.s-in_progress { color: #b91c1c; }
.sd-dot.s-done, .sched-bar.s-done { color: #334155; }
.sd-dot.s-paid, .sched-bar.s-paid { color: #15803d; }

/* ---- day agenda rows ---- */
.sched-row {
  position: relative;
  display: flex; align-items: center; gap: 2px;
  min-height: 64px; padding: 8px 4px 8px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  touch-action: pan-y; /* vertical scroll stays native until a row is lifted */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.sched-bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; }
.sched-main {
  flex: 1; min-width: 0; min-height: 48px;
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; padding: 4px 0;
}
.sched-time { min-width: 72px; flex-shrink: 0; }
.sched-time div:first-child { font-weight: 700; }

/* lifted (dragging) row */
.sched-row.lifted {
  pointer-events: none; /* elementFromPoint must see the chips underneath */
  touch-action: none;
  z-index: 40;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(13, 22, 31, 0.25);
  opacity: 0.95;
}

/* calendar busy blocks (read-only) */
.sched-busy { min-height: 52px; border-style: dashed; background: transparent; color: var(--muted); }

/* connect card */
.sched-connect { padding: 10px 14px; margin-top: 14px; }

/* ---- nudges ---- */
.nudge-label { margin: 16px 2px 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.nudge-row {
  display: flex; align-items: center; gap: 8px;
  min-height: 64px; padding: 10px 6px 10px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.nudge-main {
  flex: 1; min-width: 0; min-height: 44px;
  background: none; border: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; padding: 0;
}
.nudge-title { font-weight: 600; }
