/**
 * people.css — People Settings page styles
 * Complements forecast.css (loaded first on the same page).
 */

/* ── Override the SPA fixed-height layout from forecast.css ── */
.app          { height: auto; min-height: 100vh; overflow: visible; }
.app-main     { overflow: visible; flex: none; }

/* ── Page layout ── */
.people-content {
  padding: 20px 24px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.ps-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ps-text-input {
  min-width: 220px;
  padding: 6px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 13px;
  color: #1E293B;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ps-text-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

.ps-select {
  padding: 6px 10px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 13px;
  color: #1E293B;
  background: #fff;
  cursor: pointer;
  min-width: 200px;
  outline: none;
  transition: border-color .15s;
}
.ps-select:focus { border-color: #3B82F6; }

/* ── Projects panel ──────────────────────────────────────── */
.ps-projects-panel {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 12px 24px;
  flex-shrink: 0;
}

.ps-projects-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ps-projects-title {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
}
.ps-projects-hint {
  font-size: 12px;
  color: #94A3B8;
  flex: 1;
  min-width: 160px;
}
.ps-add-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.ps-add-input {
  width: 200px;
}
.ps-add-btn {
  white-space: nowrap;
}

.ps-projects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  align-items: center;
}
.ps-projects-empty {
  font-size: 12px;
  color: #CBD5E1;
  font-style: italic;
}

/* Project chip */
.ps-project-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 16px;
  padding: 4px 10px 4px 12px;
  font-size: 13px;
  color: #1E40AF;
  font-weight: 500;
}
.ps-project-chip-name { line-height: 1; }
.ps-project-chip-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #93C5FD;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 50%;
  transition: color .12s, background .12s;
}
.ps-project-chip-del:hover {
  color: #DC2626;
  background: rgba(220,38,38,.1);
}

/* ── Stats bar ────────────────────────────────────────────── */
.ps-stats {
  padding: 5px 24px;
  font-size: 12px;
  color: #94A3B8;
  background: #F8FAFC;
  border-bottom: 1px solid #F1F5F9;
  flex-shrink: 0;
}

/* ── Group card ───────────────────────────────────────────── */
.ps-group {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}

.ps-group-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: #F1F5F9;
  border-bottom: 1px solid #E2E8F0;
}
.ps-group-name {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
}
.ps-group-count {
  font-size: 12px;
  color: #94A3B8;
}
.ps-group-set {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  background: #D1FAE5;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ── People table ─────────────────────────────────────────── */
.ps-table {
  width: 100%;
  border-collapse: collapse;
}
.ps-table th,
.ps-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
  vertical-align: middle;
}
.ps-table thead th {
  background: #F8FAFC;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ps-table tbody tr:hover             { background: #F8FAFC; }
.ps-table tbody tr:last-child td     { border-bottom: none; }

.ps-col-name    { width: 200px;  min-width: 160px; }
.ps-col-title   { min-width: 140px; color: #475569; }
.ps-col-project-cb { width: 90px; min-width: 80px; text-align: center; }
.ps-col-status  { width: 30px; text-align: center; }

/* Checkbox label (full-cell click area) */
.ps-cb-label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}
.ps-cb-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3B82F6;
}

/* Person name cells */
.ps-name-main {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}
.ps-name-sub {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 1px;
}

/* ── Save indicator ───────────────────────────────────────── */
.ps-save-indicator {
  display: inline-block;
  font-size: 14px;
  width: 1.2em;
  text-align: center;
}
.ps-saving { color: #F59E0B; }
.ps-saved  { color: #10B981; }
.ps-error  { color: #DC2626; }

/* ── Back link in header ──────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #64748B;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #E2E8F0;
  background: #fff;
  margin-right: 10px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.back-link:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #1E293B;
}
