/* Frontline / People Tasks - operational UI v2
   Scoped to the Tasks page and its drawer. All colors inherit CRM theme tokens. */

/* Compact list: more working space, less decorative chrome. */
.people-tasks {
  color:var(--text-primary);
  font-size:13px;
  padding:12px 4px 4px;
}
.people-tasks .pt-head {margin-bottom:14px;gap:10px}
.people-tasks .pt-head h1 {font-size:22px;line-height:1.2;margin:0 0 3px}
.people-tasks .pt-head span {font-size:11.5px}
.people-tasks .pt-head>div:last-child {align-items:center;flex-wrap:wrap;gap:7px}
.people-tasks .pt-head>div:last-child button {
  height:34px;min-height:34px;padding:6px 11px;font-size:12px;
  border-radius:6px;border:1px solid var(--border-strong);
  background:var(--bg-surface);color:var(--text-primary);
}
.people-tasks .pt-head>div:last-child button:hover:not(:disabled) {background:var(--bg-raised)}
.people-tasks .pt-views {gap:6px;margin-bottom:11px}
.people-tasks .pt-views button {
  min-height:34px;height:34px;padding:5px 10px;gap:10px;
  border-radius:6px;border:1px solid var(--border);font-size:12px;
  background:var(--bg-surface);color:var(--text-secondary);
}
.people-tasks .pt-views button.active {
  border-color:var(--accent);background:var(--accent-soft);
  color:var(--accent-text);font-weight:650;
}
.people-tasks .pt-views b {
  min-width:24px;display:inline-flex;justify-content:center;
  color:inherit;background:var(--bg-raised);
  padding:2px 5px;font-size:11px;
  font-variant-numeric:tabular-nums;
}
.people-tasks .pt-views .overdue b {color:var(--danger-text);background:var(--danger-soft)}
.people-tasks .pt-views .today b {color:var(--warning-text);background:var(--warning-soft)}
.people-tasks .pt-filters {
  align-items:center;gap:7px;margin-bottom:12px;padding:0;
}
.people-tasks .pt-filters input,
.people-tasks .pt-filters select,
.people-tasks .pt-filters button {
  height:36px;min-height:36px;border-radius:6px;
  border:1px solid var(--border-strong);
  background:var(--bg-surface);color:var(--text-primary);
  font-size:12px;
}
.people-tasks .pt-filters input {min-width:220px;flex:1 1 280px}
.people-tasks .pt-filters select {max-width:215px;flex:0 1 190px}
.people-tasks .pt-filters #ptKind {max-width:200px}
.people-tasks .pt-filters #ptReset {flex:0 0 auto}
.people-tasks .pt-notice {display:none}
.people-tasks .pt-tablewrap {
  border:1px solid var(--border);border-radius:8px;
  max-height:calc(100dvh - 300px);min-height:240px;
  background:var(--bg-surface);
  scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);
}
.people-tasks table {min-width:910px;table-layout:fixed}
.people-tasks thead th {
  background:var(--bg-raised);color:var(--text-secondary);
  padding:9px 11px;letter-spacing:.03em;text-transform:uppercase;
  font-size:10.5px;font-weight:650;white-space:nowrap;
}
.people-tasks thead th button {
  font:inherit;border:0;padding:0;min-height:20px;height:auto;
  color:var(--text-secondary);background:none;text-transform:uppercase;
  letter-spacing:inherit;font-weight:inherit;
}
.people-tasks thead th button:hover {color:var(--accent-text)}
.people-tasks tbody tr {background:var(--bg-surface);transition:none}
.people-tasks tbody tr:hover,
.people-tasks tbody tr:focus-visible {background:var(--bg-raised)}
.people-tasks td {
  padding:9px 11px;border-bottom:1px solid var(--border-subtle);
  vertical-align:middle;font-size:12.5px;line-height:1.3;
  overflow:hidden;text-overflow:ellipsis;
}
.people-tasks td:nth-child(2) {font-weight:600}
.people-tasks td:nth-child(3),
.people-tasks td:nth-child(4) {color:var(--text-secondary);font-size:12px}
.people-tasks td small {
  display:block;font-size:10.5px;
  line-height:1.35;color:var(--text-tertiary);
  margin-top:4px;
}
.people-tasks .pt-task-name {
  display:block;max-width:100%;
  padding:0;border:0;min-height:0;height:auto;
  background:none;color:var(--text-primary);
  font-size:12.5px;font-weight:650;text-align:left;
  line-height:1.4;white-space:normal;overflow-wrap:anywhere;
}
.people-tasks .pt-task-name:hover {color:var(--accent-text);background:none}
.people-tasks .pt-status,.people-tasks .pt-process {
  padding:4px 7px;border:0;border-radius:5px;font-size:10.5px;
  font-weight:600;line-height:1.3;white-space:nowrap;
}
.people-tasks .pt-late {color:var(--danger-text)}
.people-tasks .pt-foot {padding:12px 1px 4px;font-size:11px}
.people-tasks .pt-foot button {
  height:32px;min-height:32px;padding:5px 12px;
  font-size:11.5px;border-radius:6px;
}

/* True panel layout: full-height body scroll and persistent action footer. */
.people-tasks .pt-modal {
  background:rgba(0,0,0,.55);
  backdrop-filter:none;
  align-items:stretch;
  padding:0;
}
.people-tasks .pt-drawer.pt2-drawer {
  display:flex;flex-direction:column;
  box-sizing:border-box;
  width:min(640px,100vw);height:100dvh;max-height:100dvh;
  padding:0;margin:0;
  overflow:hidden;
  border-left:1px solid var(--border);
  background:var(--bg-canvas);
  color:var(--text-primary);
  box-shadow:none;
}
.people-tasks .pt2-head {
  flex:0 0 auto;min-height:57px;
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;
  padding:11px 20px;margin:0;
  border-bottom:1px solid var(--border);
  background:var(--bg-surface);
}
.people-tasks .pt2-crumb {
  display:flex;align-items:center;min-width:0;
  gap:9px;color:var(--text-tertiary);
  font-size:11.5px;font-weight:500;line-height:1.4;
}
.people-tasks .pt2-process {color:var(--text-primary);font-weight:700;white-space:nowrap}
.people-tasks .pt2-crumb-sep {color:var(--text-tertiary)}
.people-tasks .pt2-stage {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.people-tasks .pt2-icon-button {
  flex:0 0 32px;display:grid;place-items:center;
  width:32px;height:32px;min-height:32px;
  padding:0;border:1px solid var(--border);border-radius:6px;
  background:var(--bg-surface);color:var(--text-secondary);
  font-size:19px;line-height:1;
}
.people-tasks .pt2-icon-button:hover {background:var(--bg-raised);color:var(--text-primary)}
.people-tasks .pt2-scroll {
  flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  padding:21px 24px 32px;
  scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-track);
  overscroll-behavior:contain;
}
.people-tasks .pt2-intro {padding:0 0 19px;border-bottom:1px solid var(--border)}
.people-tasks .pt2-intro-top {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.people-tasks .pt2-overline {
  font-size:10px;font-weight:750;letter-spacing:.08em;
  color:var(--text-tertiary);
}
.people-tasks .pt2-status {
  display:inline-flex;align-items:center;justify-content:center;
  padding:5px 8px;min-height:25px;
  border-radius:5px;background:var(--neutral-soft);color:var(--neutral-text);
  font-size:11px;font-weight:700;white-space:nowrap;
}
.people-tasks .pt2-status.overdue {background:var(--danger-soft);color:var(--danger-text)}
.people-tasks .pt2-status.today {background:var(--warning-soft);color:var(--warning-text)}
.people-tasks .pt2-status.upcoming {background:var(--info-soft);color:var(--info-text)}
.people-tasks .pt2-status.completed {background:var(--success-soft);color:var(--success-text)}
.people-tasks .pt2-title-label {
  display:block;font-size:11px;color:var(--text-secondary);
  margin:0 0 6px;font-weight:550;
}
.people-tasks .pt2-title-input {
  box-sizing:border-box;display:block;width:100%;
  min-height:42px;height:auto;padding:8px 11px;
  background:var(--bg-inset);color:var(--text-primary);
  border:1px solid var(--border-strong);border-radius:6px;
  font-size:19px;line-height:1.25;font-weight:700;
  outline:0;
}
.people-tasks .pt2-title-input:focus,
.people-tasks .pt2-field input:focus,
.people-tasks .pt2-description textarea:focus {
  border-color:var(--accent);box-shadow:var(--focus-ring);
  outline:none;
}
.people-tasks .pt2-title-input:disabled,
.people-tasks .pt2-field input:disabled,
.people-tasks .pt2-description textarea:disabled {
  opacity:1;background:var(--bg-raised);
  color:var(--text-primary);cursor:default;
}
.people-tasks .pt2-complete {
  display:flex;align-items:center;gap:9px;
  margin:13px 0 0;
  font-size:12.5px;font-weight:600;color:var(--text-secondary);
  cursor:pointer;
}
.people-tasks .pt2-complete input {
  flex:0 0 17px;width:17px;height:17px;min-height:17px;
  accent-color:var(--success);margin:0;padding:0;
  cursor:pointer;
}
.people-tasks .pt2-readonly {
  font-size:11.5px;color:var(--text-secondary);margin:10px 0 0;
}
.people-tasks .pt2-section {
  display:block;min-width:0;
  margin:0;padding:18px 0;
  border-bottom:1px solid var(--border);
}
.people-tasks .pt2-section h3 {
  margin:0 0 13px;color:var(--text-primary);
  font-size:12.5px;line-height:1.4;font-weight:750;
}
.people-tasks .pt2-fields {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;
}
.people-tasks .pt2-field {min-width:0}
.people-tasks .pt2-field label,
.people-tasks .pt2-description label {
  display:block;margin:0 0 7px;
  font-size:11px;line-height:1.25;font-weight:550;color:var(--text-secondary);
}
.people-tasks .pt2-field input {
  display:block;box-sizing:border-box;
  width:100%;height:38px;min-height:38px;
  padding:8px 10px;border-radius:6px;
  background:var(--bg-surface);color:var(--text-primary);
  border:1px solid var(--border-strong);
  font-size:12.5px;line-height:1.4;
  outline:0;
}
.people-tasks .pt2-quickdates {
  display:flex;align-items:center;flex-wrap:wrap;
  gap:6px;margin-top:11px;
}
.people-tasks .pt2-quickdates span {font-size:10.5px;color:var(--text-tertiary);margin-right:4px}
.people-tasks .pt2-quickdates button {
  min-height:27px;height:27px;padding:4px 9px;
  font-size:11px;font-weight:500;border-radius:5px;
  border:1px solid var(--border);
  background:var(--bg-raised);color:var(--text-secondary);
}
.people-tasks .pt2-quickdates button:hover {
  border-color:var(--border-strong);background:var(--bg-surface);
  color:var(--text-primary);
}
.people-tasks .pt2-related {
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;min-width:0;
  padding:12px 13px;border:1px solid var(--border);
  border-radius:7px;background:var(--bg-surface);
}
.people-tasks .pt2-related-copy {display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.people-tasks .pt2-related-copy small {font-size:10.5px;color:var(--text-tertiary)}
.people-tasks .pt2-related-copy strong {
  min-width:0;color:var(--text-primary);
  font-size:12.5px;line-height:1.4;font-weight:700;
  white-space:normal;overflow-wrap:anywhere;
}
.people-tasks .pt2-open-card {
  flex:0 0 auto;height:31px;min-height:31px;
  padding:6px 11px;border:1px solid var(--border-strong);
  border-radius:6px;background:var(--bg-raised);
  font-size:11.5px;font-weight:650;
  color:var(--accent-text);
}
.people-tasks .pt2-open-card:hover {background:var(--bg-surface)}
.people-tasks .pt2-description {border-bottom:0;padding-bottom:0}
.people-tasks .pt2-description textarea {
  box-sizing:border-box;width:100%;display:block;max-width:100%;
  min-height:125px;max-height:50vh;
  padding:11px 12px;border-radius:6px;
  border:1px solid var(--border-strong);
  background:var(--bg-surface);color:var(--text-primary);
  font-size:12.5px;line-height:1.6;font-family:inherit;
  resize:vertical;outline:none;white-space:pre-wrap;overflow-wrap:anywhere;
}
.people-tasks .pt2-footer {
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:66px;margin:0;padding:11px 20px;
  border-top:1px solid var(--border);
  background:var(--bg-surface);
}
.people-tasks .pt2-feedback {
  flex:1 1 auto;min-width:0;font-size:11.5px;
  color:var(--danger-text);line-height:1.4;
}
.people-tasks .pt2-actions {display:flex;align-items:center;gap:8px;flex:0 0 auto}
.people-tasks .pt2-actions button {
  height:35px;min-height:35px;min-width:90px;
  padding:7px 14px;border-radius:6px;
  font-size:12px;font-weight:700;
}
.people-tasks .pt2-secondary {
  background:var(--bg-surface);color:var(--text-primary);
  border:1px solid var(--border-strong);
}
.people-tasks .pt2-primary {
  background:var(--accent);color:#fff;
  border:1px solid var(--accent);
}
.people-tasks .pt2-primary:hover:not(:disabled) {filter:brightness(.94)}
.people-tasks .pt2-primary:disabled {opacity:.48;cursor:not-allowed}

@media (max-width:640px) {
  .people-tasks .pt2-scroll {padding:16px 16px 25px}
  .people-tasks .pt2-head,.people-tasks .pt2-footer {padding-left:14px;padding-right:14px}
  .people-tasks .pt2-fields {grid-template-columns:minmax(0,1fr)}
  .people-tasks .pt2-related {align-items:flex-start;flex-wrap:wrap}
  .people-tasks .pt2-open-card {margin-left:auto}
  .people-tasks .pt2-title-input {font-size:17px}
  .people-tasks .pt2-actions button {min-width:76px;padding:6px 9px}
  .people-tasks .pt-filters select {flex:1 1 140px;max-width:100%}
}
