/* feature-specific styles for activities & tasks (see styles/features.css for the shared .task-card .checklist .calendar .cal-day .cal-head .step-row .update-item) */

/* ---------- shared bits ---------- */
.act-body { display: flex; flex-direction: column; gap: var(--sp-4); }
.sel-sm { height: 28px; width: auto; min-width: 112px; max-width: 190px; font-size: var(--fs-xs); padding-inline-end: 26px; } .inp-sm { height: 28px; width: auto; font-size: var(--fs-xs); }
/* "Move to…" on a task card: the keyboard / no-mouse way to do what drag & drop does. Quiet until the card is hovered or focused. */
.task-card .move-sel { height: 28px; width: 100%; font-size: var(--fs-xs); padding-inline-end: 26px; opacity: .55; transition: opacity var(--t-fast); }
.task-card:hover .move-sel, .task-card:focus-within .move-sel { opacity: 1; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip.c-danger:hover { border-color: var(--danger); color: var(--danger); } .chip.c-danger.active { background: var(--danger); border-color: var(--danger); color: var(--on-solid); }
/* `.late` used to be a bare global rule, so EVERY element inside a late card inherited danger-red —
   including whole deal titles on the board, which is what made it look alarming and over-coloured.
   Lateness now shows on the timer chip and a small badge; the text stays readable. */
.late-text, .meta .late, .counter.late { color: var(--danger); } .late-text svg, .meta .late svg, .counter.late svg { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 3px; }
.segmented button svg { width: 14px; height: 14px; }
/* When the filter row is too wide the view switch wraps onto its own line; it should still sit at the end
   of that line, where the eye expects a view switch, not orphaned at the start. */
.tasks-bar > .segmented { margin-inline-start: auto; }
.act-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.ic-wrap { width: 28px; height: 28px; border-radius: var(--r-xs); display: inline-grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.ic-wrap svg { width: 15px; height: 15px; }
.ic-wrap.t-call { background: var(--info-soft); color: var(--info); } .ic-wrap.t-meeting { background: var(--ai-soft); color: var(--ai); } .ic-wrap.t-email { background: var(--warning-soft); color: var(--warning); }
.ic-wrap.t-whatsapp { background: var(--success-soft); color: var(--success); } .ic-wrap.t-visit { background: var(--accent-soft); color: var(--accent); } .ic-wrap.t-note { background: var(--surface-3); color: var(--text-2); } .ic-wrap.t-task { background: var(--brand-soft); color: var(--brand-ink); } .ic-wrap.t-demo { background: var(--brand-soft); color: var(--brand-ink); }
[data-theme="dark"] .ic-wrap.t-call { color: var(--info); } [data-theme="dark"] .ic-wrap.t-meeting { color: var(--ai-strong); } [data-theme="dark"] .ic-wrap.t-email { color: var(--warning); } [data-theme="dark"] .ic-wrap.t-whatsapp { color: var(--success); } [data-theme="dark"] .ic-wrap.t-visit { color: var(--accent-strong); }

/* ---------- manager strip ---------- */
/* Three big KPI tiles between the filters and the table pushed the actual work below the fold. The same
   three numbers now read as one line — they are context for the list, not the point of the screen. */
.mgr-strip { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: 8px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-sm); }
.mgr-strip:empty { display: none; }
.mgr-strip-head { display: flex; align-items: center; gap: 6px; color: var(--text-2); } .mgr-strip-head svg { width: 15px; height: 15px; color: var(--text-3); }
.mgr-strip .grid, .mgr-strip .grid-3 { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-inline-start: auto; }
.mgr-strip .stat { flex-direction: row; align-items: baseline; gap: 6px; padding: 0; border: 0; background: none; border-radius: 0; }
.mgr-strip .stat::before { display: none; }
.mgr-strip .stat .label { order: 2; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: var(--fs-sm); color: var(--text-3); }
.mgr-strip .stat .label svg { display: none; }
.mgr-strip .stat .value { order: 1; font-size: var(--fs-lg); font-weight: var(--fw-semi); }
.mgr-strip .stat.c-danger .value { color: var(--danger); } .mgr-strip .stat.c-success .value { color: var(--success); }
[data-theme="dark"] .mgr-strip-head { color: var(--text); }

/* ---------- task board ---------- */
.task-board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.tcol { display: flex; flex-direction: column; gap: 8px; border-radius: var(--r-lg); padding: 8px; background: var(--surface-2); border: 1px solid var(--border); min-height: 320px; transition: background var(--t-fast), box-shadow var(--t-fast); }
.tcol.over { background: color-mix(in srgb, var(--col-c) 9%, var(--surface-2)); box-shadow: inset 0 0 0 2px var(--col-c); }
.tcol-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 8px; border-bottom: 3px solid var(--col-c); margin-bottom: 4px; }
.tcol-head .ico { width: 28px; height: 28px; border-radius: var(--r-xs); background: var(--col-c); color: var(--on-solid); display: grid; place-items: center; box-shadow: 0 4px 12px color-mix(in srgb, var(--col-c) 45%, transparent); } .tcol-head .ico svg { width: 15px; height: 15px; }
.tcol-head b { font-size: var(--fs-sm); } .tcol-head .cnt { margin-inline-start: auto; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.tcol-cards { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.tcol-empty { border: 2px dashed var(--border-strong); border-radius: var(--r-lg); padding: 26px 12px; text-align: center; color: var(--text-4); font-size: var(--fs-xs); display: flex; flex-direction: column; align-items: center; gap: 6px; } .tcol-empty svg { width: 22px; height: 22px; }
.task-card { position: relative; cursor: grab; box-shadow: var(--shadow-sm); animation: rise-in var(--t-base) var(--ease-out) both; padding-inline-start: 18px; }
.task-card::before { content: ""; position: absolute; inset-inline-start: 7px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--border-strong); }
.task-card.p-high::before { background: var(--warning); } .task-card.p-urgent::before { background: var(--danger); box-shadow: 0 0 8px var(--danger); } .task-card.p-low::before { background: var(--text-4); }
.task-card:active { cursor: grabbing; } .task-card.dragging { opacity: .45; transform: rotate(2deg) scale(.98); }
.task-card .ttl { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; } .task-card.late .ttl { color: var(--danger); } .task-card.is-done .ttl { color: var(--text-3); text-decoration: line-through; }
.task-card .meta { font-size: var(--fs-xs); } .task-card .meta .badge { height: 22px; font-size: 10.5px; }
.task-card .note { display: flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--text-3); padding: 6px 8px; border-radius: var(--r-sm); background: var(--surface-2); } .task-card .note svg { width: 12px; height: 12px; flex: none; color: var(--text-4); }
.tbl .primary.late { color: var(--danger); }

/* ---------- calendar ---------- */
.cal-card { overflow: hidden; } .cal-card .calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); } .cal-day { min-width: 0; } .cal-day .ev { min-width: 0; max-width: 100%; }
.cal-toolbar { flex-wrap: wrap; gap: 10px; }
.cal-title { font-size: var(--fs-lg); font-weight: 700; min-width: 180px; text-align: center; margin: 0; }
.cal-legend { display: flex; gap: 12px; font-size: var(--fs-xs); color: var(--text-3); } .cal-legend span { display: inline-flex; align-items: center; gap: 5px; } .cal-legend i { width: 10px; height: 10px; border-radius: 3px; }
.cal-heads { margin-bottom: 6px; }
.cal-day { cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); animation: fade-in var(--t-base) both; }
.cal-day:hover { border-color: var(--brand); background: var(--surface-hover); }
.cal-day.weekend { background: var(--surface-2); } .cal-day.weekend:hover { background: var(--surface-hover); }
.cal-day.today .d { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--on-solid); display: grid; place-items: center; }
.cal-day .pill-count { height: 16px; min-width: 16px; font-size: 10px; }
.cal-day .ev { display: flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.4; animation: rise-in var(--t-base) var(--ease-out) both; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.cal-day .ev:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); } [dir="rtl"] .cal-day .ev:hover { transform: translateX(-2px); }
.cal-day .ev svg { width: 11px; height: 11px; flex: none; } .cal-day .ev .tm { font-variant-numeric: tabular-nums; opacity: .75; font-size: 10px; flex: none; }
.cal-day .ev.done { opacity: .5; text-decoration: line-through; } .cal-day .ev.late { background: var(--danger-soft); color: var(--danger); }
[data-theme="dark"] .cal-day .ev.late { color: var(--danger); }
.cal-day .more { font-size: 10.5px; color: var(--brand); font-weight: 600; cursor: pointer; } .cal-day .hidden-evs { display: contents; }
@media (max-width: 900px) { .calendar { gap: 3px; } .cal-day { min-height: 70px; padding: 4px; } .cal-day .ev .tm, .cal-day .ev svg { display: none; } }

/* ---------- follow-up plans ---------- */
.plan-card { position: relative; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.plan-card::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, var(--blue-500), var(--rose-500)); }
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); } .plan-card.off { opacity: .72; } .plan-card.off::before { background: var(--border-strong); }
.plan-top { display: flex; align-items: center; gap: 10px; }
.plan-ico { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--brand-ink); flex: none; background: var(--brand-soft); border: 1px solid var(--border); } .plan-ico svg { width: 18px; height: 18px; }
.plan-name { font-size: var(--fs-md); display: block; }
.plan-steps { display: flex; flex-direction: column; gap: 6px; position: relative; padding-inline-start: 4px; }
.plan-step { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); padding: 4px 6px; border-radius: var(--r-sm); transition: background var(--t-fast); } .plan-step:hover { background: var(--surface-2); }
.plan-step .day { min-width: 50px; text-align: center; font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
[data-theme="dark"] .plan-step .day { color: var(--text); }
.plan-step .ic-wrap { width: 24px; height: 24px; border-radius: var(--r-sm); } .plan-step .ic-wrap svg { width: 13px; height: 13px; }
.plan-steps.compact { max-height: 200px; overflow: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); }
.plan-actions { margin-top: auto; }
.step-rows { display: flex; flex-direction: column; gap: 8px; }
.step-row { grid-template-columns: 72px 150px minmax(0, 1fr) 36px; } .step-row > * { min-width: 0; } .step-row[data-i] { animation: rise-in var(--t-base) var(--ease-out) both; } .step-row .select { min-width: 0; }
.step-row.step-head { padding: 0 4px; } .step-row .btn-icon { width: 28px; height: 28px; padding: 0; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .task-board { grid-template-columns: 1fr; } .mgr-strip .grid-3 { grid-template-columns: 1fr; } .plan-grid { grid-template-columns: 1fr; } .step-row { grid-template-columns: 60px 1fr 32px; } .step-row [data-subject] { grid-column: 1 / 3; } }

/* a whole day opened in one sheet, instead of clicking events one at a time */
.day-sheet { max-height: 60vh; overflow-y: auto; }
.day-sheet .day-ev { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; cursor: pointer; }
.day-sheet .ev-time { font-size: var(--fs-xs); color: var(--text-3); min-width: 46px; }
.day-sheet .day-ev .ico { width: 28px; height: 28px; border-radius: var(--r-xs); display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.day-sheet .day-ev .ico.task { background: var(--brand-soft); color: var(--brand); }
.day-sheet .day-ev .ico.activity { background: var(--info-soft); color: var(--info); }
.day-sheet .day-ev .ico.tender, .day-sheet .day-ev .ico.deal { background: var(--warning-soft); color: var(--warning); }
.day-sheet .day-ev .meta { display: block; font-size: var(--fs-xs); color: var(--text-3); }
