/* tabs/personnel/personnel.css — Staff dashboard */

#tab-personnel.active { display: flex; align-items: stretch; }

/* ══════════════════════════════════════════
   OUTER WRAP + SIDEBAR
══════════════════════════════════════════ */

.perc-wrap {
  display: flex;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.perc-sidebar {
  display: flex;
  flex-direction: column;
  width: 190px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border);
  background: rgba(4,5,18,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.perc-sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 11px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232,121,249,0.8);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.perc-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
.perc-list::-webkit-scrollbar { width: 3px; }
.perc-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.perc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  transition: background 0.13s ease;
  text-align: left;
}
.perc-row:hover  { background: rgba(255,255,255,0.05); }
.perc-row.active { background: rgba(232,121,249,0.10); }

.perc-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av-color) 16%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--av-color) 35%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  color: var(--av-color); flex-shrink: 0; letter-spacing: 0.03em;
}

.perc-row-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.perc-row-name {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.perc-row-role {
  font-family: var(--font-body); font-size: 9px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8;
}

.perc-row-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: transparent; flex-shrink: 0; transition: background 0.3s ease;
}
.perc-row-dot.online  { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.55); animation: perc-dot-pulse 2s ease-in-out infinite; }
.perc-row-dot.offline { background: #fb7185; box-shadow: 0 0 5px rgba(251,113,133,0.40); }

@keyframes perc-dot-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(52,211,153,0.4); }
  50%       { box-shadow: 0 0 10px rgba(52,211,153,0.8); }
}

/* ══════════════════════════════════════════
   DETAIL SHELL
══════════════════════════════════════════ */

.perc-detail {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0;
}

.perc-detail-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-size: 12px; color: var(--text-dim); letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════
   DASHBOARD CONTAINER
══════════════════════════════════════════ */

.perc-dashboard {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  animation: perc-in 0.22s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes perc-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   HEADER BAR (full width)
══════════════════════════════════════════ */

.perc-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(4,5,18,0.3);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.perc-profile-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av-color) 13%, transparent);
  border: 2px solid color-mix(in srgb, var(--av-color) 38%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--av-color) 16%, transparent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.perc-profile-avatar span {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--av-color); letter-spacing: 0.04em;
}

.perc-header-info { display: flex; flex-direction: column; gap: 5px; margin-right: 12px; }

.perc-profile-name {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
}

.perc-online-badge {
  font-family: var(--font-body); font-size: 9.5px; font-weight: 600;
  color: #34d399; letter-spacing: 0.06em;
}

.perc-mock-badge {
  font-family: var(--font-mono); font-size: 8px; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(251,191,36,0.9);
  background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.28);
  padding: 1px 7px; border-radius: 4px;
}

.perc-profile-badge {
  font-family: var(--font-body); font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 20px; border: 1px solid;
  align-self: flex-start;
}

/* Inline stats strip */
.perc-header-stats {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.perc-hstat {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 16px;
  border-left: 1px solid var(--glass-border);
  min-width: 72px;
}

.perc-hstat-val {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: rgba(232,121,249,0.85); line-height: 1;
}
.perc-hstat-val.perc-hstat-sm {
  font-size: 11px; font-weight: 600; font-family: var(--font-body);
  color: var(--text-secondary); text-align: center;
}
.perc-hstat-val.perc-skeleton { opacity: 0.25; }

.perc-hstat-label {
  font-family: var(--font-body); font-size: 8px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   3-COLUMN BODY
══════════════════════════════════════════ */

.perc-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Left col — account info, heatmap, type breakdown */
.perc-col-left {
  width: 230px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
.perc-col-left::-webkit-scrollbar { width: 3px; }
.perc-col-left::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

/* Mid col — tickets list */
.perc-col-mid {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
}

/* Right col — activity feed, fills remaining space */
.perc-col-right {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */

.perc-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.perc-tickets-card,
.perc-feed-card {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.perc-card-head {
  font-family: var(--font-display); font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.perc-card-count {
  font-family: var(--font-body); font-size: 9px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
  background: rgba(232,121,249,0.10); color: rgba(232,121,249,0.8);
  letter-spacing: 0.04em; text-transform: none; margin-left: auto;
}

/* ── Key-value list (account details) ── */
.perc-kv-list { display: flex; flex-direction: column; gap: 6px; }
.perc-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.perc-kv-key {
  font-family: var(--font-body); font-size: 9.5px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
}
.perc-kv-val {
  font-family: var(--font-body); font-size: 10.5px; font-weight: 600;
  color: var(--text-secondary); text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}

/* ── Login heatmap ── */
.perc-heatmap {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 52px;
}

.perc-hm-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
  cursor: default;
}

.perc-hm-bar {
  width: 100%;
  background: rgba(232,121,249,0.25);
  border-radius: 2px 2px 0 0;
  transition: background 0.2s ease;
  min-height: 2px;
}

.perc-hm-day.has-login .perc-hm-bar {
  background: rgba(232,121,249,0.7);
}
.perc-hm-day:hover .perc-hm-bar { background: rgba(232,121,249,0.9); }

.perc-hm-label {
  font-family: var(--font-body); font-size: 8px; color: var(--text-dim);
  text-align: center; height: 10px; line-height: 10px;
}

/* ── Ticket type cells ── */
.perc-type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; align-items: stretch; }
.perc-type-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 4px 8px; min-height: 86px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
}
.perc-type-icon-wrap {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.perc-type-num  { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: rgba(232,121,249,0.85); line-height:1; }
.perc-type-label { font-family: var(--font-body); font-size: 7.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }

/* ── Inline type icon (tickets + feed) ── */
.perc-type-sm-icon { display: inline-flex; align-items: center; flex-shrink: 0; vertical-align: middle; }

/* ── Bug status bar ── */
.perc-bug-bar {
  height: 6px; width: 100%; border-radius: 3px;
  background: var(--glass-border); display: flex; overflow: hidden; gap: 1px;
}
.perc-bug-bar-seg          { height: 100%; border-radius: 2px; transition: width 0.5s var(--ease-spring); }
.perc-bug-bar-seg.resolved { background: #34d399; }
.perc-bug-bar-seg.inprog   { background: #fbbf24; }
.perc-bug-bar-seg.open     { background: #fb7185; }

.perc-bug-bar-legend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.perc-legend {
  font-family: var(--font-body); font-size: 9px; font-weight: 600;
  letter-spacing: 0.06em; display: flex; align-items: center; gap: 4px;
}
.perc-legend::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.perc-legend.resolved { color: #34d399; } .perc-legend.resolved::before { background: #34d399; }
.perc-legend.inprog   { color: #fbbf24; } .perc-legend.inprog::before   { background: #fbbf24; }
.perc-legend.open     { color: #fb7185; } .perc-legend.open::before     { background: #fb7185; }

/* ── Ticket list ── */
.perc-ticket-list {
  display: flex; flex-direction: column; gap: 5px;
  overflow-y: auto; flex: 1;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.perc-ticket-list::-webkit-scrollbar { width: 3px; }
.perc-ticket-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.perc-ticket {
  display: flex; flex-direction: column; gap: 4px;
  padding: 7px 9px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  transition: background 0.12s ease;
}
.perc-ticket:hover { background: rgba(255,255,255,0.04); }
.perc-ticket-top { display: flex; align-items: center; gap: 6px; }
.perc-ticket-icon { display: flex; align-items: center; flex-shrink: 0; }
.perc-ticket-title {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.perc-ticket-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.perc-ticket-status {
  font-family: var(--font-body); font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; border: 1px solid transparent;
}
.perc-ticket-prio {
  font-family: var(--font-body); font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px;
}
.prio-high   { color: #fb7185; background: rgba(251,113,133,0.08); }
.prio-medium { color: #fbbf24; background: rgba(251,191,36,0.08);  }
.prio-low    { color: #34d399; background: rgba(52,211,153,0.08);  }
.perc-ticket-date { font-family: var(--font-body); font-size: 9px; color: var(--text-muted); margin-left: auto; }

/* ── Activity feed ── */
.perc-feed {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.perc-feed::-webkit-scrollbar { width: 3px; }
.perc-feed::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.perc-feed-empty {
  font-family: var(--font-body); font-size: 11px; color: var(--text-dim);
  padding: 20px 0; text-align: center;
}

.perc-feed-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background 0.12s ease;
}
.perc-feed-item:hover { background: rgba(255,255,255,0.03); border-color: var(--glass-border); }

.perc-feed-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
}
.perc-feed-dot.session { background: rgba(232,121,249,0.6); }
.perc-feed-dot.bug     { background: #94a3b8; }

.perc-feed-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.perc-feed-title {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 500;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.perc-feed-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.perc-feed-time { font-family: var(--font-body); font-size: 9.5px; color: var(--text-muted); }
.perc-feed-badge {
  font-family: var(--font-body); font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px; border: 1px solid transparent;
}
.perc-feed-badge.prio-high   { color: #fb7185; border-color: rgba(251,113,133,0.30); }
.perc-feed-badge.prio-medium { color: #fbbf24; border-color: rgba(251,191,36,0.30);  }
.perc-feed-badge.prio-low    { color: #34d399; border-color: rgba(52,211,153,0.30);  }

/* ── Priority breakdown rows ── */
.perc-prio-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.perc-prio-label {
  font-family: var(--font-body); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.05em; width: 42px; flex-shrink: 0;
}
.perc-prio-bar-wrap {
  flex: 1; height: 5px; background: rgba(255,255,255,0.07);
  border-radius: 3px; overflow: hidden;
}
.perc-prio-bar {
  height: 100%; border-radius: 3px;
  transition: width 0.4s ease; opacity: 0.75;
}
.perc-prio-count {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); width: 16px; text-align: right; flex-shrink: 0;
}

/* ── Empty notes ── */
.perc-empty-note {
  font-family: var(--font-body); font-size: 10.5px; color: var(--text-dim);
  text-align: center; padding: 12px 0;
}

.perc-skeleton-block {
  height: 60px; background: rgba(255,255,255,0.04); border-radius: var(--r-sm); opacity: 0.5;
}

/* ══════════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════════ */

html[data-theme="light"] .perc-sidebar     { background: rgba(240,244,255,0.55); }
html[data-theme="light"] .perc-col-left    { background: rgba(240,244,255,0.15); }
html[data-theme="light"] .perc-row:hover   { background: rgba(232,121,249,0.06); }
html[data-theme="light"] .perc-header      { background: rgba(240,244,255,0.35); }
html[data-theme="light"] .perc-card        { background: rgba(255,255,255,0.5); }
html[data-theme="light"] .perc-ticket      { background: rgba(0,0,0,0.02); }
html[data-theme="light"] .perc-type-cell   { background: rgba(0,0,0,0.02); }

/* ══════════════════════════════════════════
   ACTIVITY VIEW ADDITIONS
══════════════════════════════════════════ */

/* Solo wrap (employee — no sidebar) */
.perc-wrap-solo { display: flex; }
.perc-detail-solo { flex: 1; overflow: hidden; display: flex; }

/* 2-column body (no mid tickets column) */
.perc-body-two .perc-col-left  { width: 250px; }
.perc-body-two .perc-col-right { flex: 1; border-right: none; }

/* Submission feed dots */
.perc-feed-dot.submit-initial   { background: #38bdf8; }
.perc-feed-dot.submit-final     { background: #34d399; }
.perc-feed-dot.submit-equipment { background: #fbbf24; }

/* Duration badge inline in feed title */
.perc-feed-dur {
  font-size: 9.5px; font-weight: 500;
  color: var(--text-muted); margin-left: 2px;
}

/* Feed top row: title + show-more side by side */
.perc-feed-top {
  display: flex; align-items: center;
  gap: 8px; min-width: 0;
}
.perc-feed-top .perc-feed-title {
  flex: 1; min-width: 0;
}

/* Show more button */
.perc-show-more {
  flex-shrink: 0;
  font-family: var(--font-body); font-size: 9px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid rgba(232,121,249,0.25);
  background: rgba(232,121,249,0.07);
  color: rgba(232,121,249,0.8);
  cursor: pointer; white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.perc-show-more:hover {
  background: rgba(232,121,249,0.14);
  border-color: rgba(232,121,249,0.45);
}

/* ── Submission detail modal ── */
.perc-sub-modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.perc-sub-modal-overlay.visible {
  opacity: 1; pointer-events: auto;
}

.perc-sub-modal {
  background: rgba(8,10,26,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  width: min(420px, 90vw);
  overflow: hidden;
  animation: perc-in 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}

html[data-theme="light"] .perc-sub-modal {
  background: rgba(246,248,255,0.98);
  border-color: rgba(0,0,0,0.10);
}

.psm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
html[data-theme="light"] .psm-header { border-bottom-color: rgba(0,0,0,0.07); }

.psm-title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 0.02em;
}

.psm-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}

.psm-close {
  width: 26px; height: 26px; border-radius: 6px; border: none;
  background: rgba(255,255,255,0.05); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease;
}
.psm-close:hover { background: rgba(255,255,255,0.10); color: var(--text-primary); }

.psm-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }

.psm-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.psm-row:last-child { border-bottom: none; padding-bottom: 0; }
html[data-theme="light"] .psm-row { border-bottom-color: rgba(0,0,0,0.06); }

.psm-label {
  font-family: var(--font-body); font-size: 9.5px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
}
.psm-val {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  color: var(--text-primary); text-align: right;
}

/* ══════════════════════════════════════════
   TEAM OVERVIEW — SIDEBAR BUTTON
══════════════════════════════════════════ */

.perc-team-btn .perc-avatar {
  background: rgba(232,121,249,0.10);
  border-color: rgba(232,121,249,0.28);
  color: rgba(232,121,249,0.85);
}

.perc-sidebar-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 8px 6px;
}

/* ══════════════════════════════════════════
   TEAM OVERVIEW — ONLINE CHIPS
══════════════════════════════════════════ */

.perc-online-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.perc-online-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border: 1px solid;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
}

.perc-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
  animation: perc-dot-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   TEAM OVERVIEW — TODAY'S SUBMISSIONS GRID
══════════════════════════════════════════ */

.perc-today-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.perc-tg-row {
  display: flex;
  align-items: center;
  padding: 6px 6px;
  border-radius: var(--r-sm);
  gap: 4px;
  transition: background 0.12s ease;
}

.perc-tg-row:hover:not(.perc-tg-head) {
  background: rgba(255,255,255,0.03);
}

.perc-tg-head {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2px;
}

.perc-tg-name {
  flex: 1;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.perc-tg-cell {
  width: 72px;
  text-align: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
}

.tg-yes { color: #34d399; }
.tg-no  { color: rgba(148,163,184,0.3); }

.tg-all-done .perc-tg-name { color: var(--text-muted); }
.tg-all-done .perc-tg-name::after { content: '✓'; font-size: 9px; color: #34d399; margin-left: 4px; }

/* Presence dot in the grid name cell */
.perc-tg-presence {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(148,163,184,0.25);
  flex-shrink: 0;
}

.perc-tg-presence.online {
  background: #34d399;
  box-shadow: 0 0 5px rgba(52,211,153,0.5);
  animation: perc-dot-pulse 2s ease-in-out infinite;
}

/* Missing submissions section */
.perc-missing-section {
  margin-top: 8px;
  padding-top: 0;
}

.perc-missing-head {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251,113,133,0.7);
  padding: 8px 6px 6px;
  border-top: 1px solid var(--glass-border);
  margin-bottom: 2px;
}

.perc-missing-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px;
  border-radius: var(--r-sm);
}

.perc-missing-name {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.perc-missing-types {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
}

.perc-team-all-done {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.20);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  color: #34d399;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════
   FEED FILTER PILLS
══════════════════════════════════════════ */

.perc-feed-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.perc-filt-btn {
  padding: 3px 10px;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.perc-filt-btn:hover {
  border-color: var(--glass-border-2);
  color: var(--text-muted);
  background: var(--glass-1);
}

.perc-filt-btn.active {
  background: rgba(232,121,249,0.10);
  border-color: rgba(232,121,249,0.32);
  color: rgba(232,121,249,0.85);
}

/* ══════════════════════════════════════════
   ACTIVE ALERTS STAT (clickable)
══════════════════════════════════════════ */

.perc-alerts-stat {
  cursor: default;
  border-radius: var(--r-sm);
  transition: background 0.14s ease;
}

.perc-alerts-stat.has-alerts {
  cursor: pointer;
}

.perc-alerts-stat.has-alerts:hover {
  background: rgba(251,113,133,0.08);
}

/* ══════════════════════════════════════════
   ALERT LIST IN MODAL
══════════════════════════════════════════ */

.perc-alert-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.perc-alert-row:last-child { border-bottom: none; }

.perc-alert-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.perc-alert-loc {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.perc-alert-msg {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.perc-alert-sev {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.perc-alert-sev.critical { color: #fb7185; background: rgba(251,113,133,0.12); border: 1px solid rgba(251,113,133,0.28); }
.perc-alert-sev.warning  { color: #fbbf24; background: rgba(251,191,36,0.10);  border: 1px solid rgba(251,191,36,0.28); }

/* ── Room Coverage ──────────────────────────────────────────────────────────── */

.perc-rc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--glass-border);
}
.perc-rc-row:last-child { border-bottom: none; }

.perc-rc-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perc-rc-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.perc-rc-badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.04);
}

/* ── Team Activity Feed ─────────────────────────────────────────────────────── */

.perc-team-feed {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
.perc-team-feed::-webkit-scrollbar { width: 3px; }
.perc-team-feed::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.perc-tf-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid var(--glass-border);
}
.perc-tf-row:last-child { border-bottom: none; }

.perc-tf-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.perc-tf-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 2px;
}

.perc-tf-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.perc-tf-badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  white-space: nowrap;
}

.perc-tf-room {
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perc-tf-time {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

/* light mode */
html[data-theme="light"] .perc-rc-badge  { background: rgba(0,0,0,0.04); }
html[data-theme="light"] .perc-tf-badge  { background: rgba(0,0,0,0.04); }

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */

@media (max-width: 900px) {
  .perc-col-mid { width: 220px; }
}

@media (max-width: 700px) {
  .perc-wrap, .perc-wrap-solo { flex-direction: column; height: auto; min-height: calc(100vh - var(--nav-h)); }
  .perc-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); max-height: 120px; }
  .perc-list    { display: flex; flex-direction: row; gap: 4px; overflow-x: auto; padding: 8px; }
  .perc-row     { flex-direction: column; align-items: center; gap: 4px; min-width: 56px; padding: 8px 6px; }
  .perc-row-role { display: none; }
  .perc-detail, .perc-detail-solo { overflow-y: auto; flex: none; width: 100%; }
  .perc-dashboard { height: auto; overflow: visible; }
  .perc-body, .perc-body-two { flex-direction: column; overflow: visible; }
  .perc-col-left, .perc-col-mid, .perc-col-right { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); }
  .perc-body-two .perc-col-left  { width: 100%; }
  .perc-body-two .perc-col-right { width: 100%; }
  .perc-col-right { min-height: 300px; }
  .perc-feed    { overflow: visible; }
  .perc-header-stats { margin-left: 0; }
  .perc-feed-top { flex-wrap: wrap; }
}
