/* ══════════════════════════════════════════════════════════════════
   Staff Concerns — Module-specific styles
   ══════════════════════════════════════════════════════════════════ */

/* ── Clickable table rows ───────────────────────────────────── */
#concernsTable tr { cursor: pointer; }
#concernsTable tr:hover td { background: var(--primary-xlight); }

/* ── Ref number styling ─────────────────────────────────────── */
.ref-no {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* ── Concern type tags ──────────────────────────────────────── */
.concern-type-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.concern-type-HR          { background: #dbeafe; color: #1d4ed8; }
.concern-type-Operational { background: #fef3c7; color: #b45309; }
.concern-type-Systems     { background: #e0e7ff; color: #4338ca; }

/* ── Concern level tags ─────────────────────────────────────── */
.concern-level {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.concern-level-minor    { background: #dcfce7; color: #15803d; }
.concern-level-moderate { background: #fef3c7; color: #b45309; }
.concern-level-major    { background: #fecaca; color: #dc2626; }

/* ── Escalation level badges ────────────────────────────────── */
.escalation-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-light);
}
.escalation-1A { background: #dcfce7; color: #15803d; }
.escalation-1B { background: #dbeafe; color: #1d4ed8; }
.escalation-2  { background: #fef3c7; color: #b45309; }
.escalation-3  { background: #fed7aa; color: #ea580c; }
.escalation-4  { background: #fecaca; color: #dc2626; }

/* ── Branch labels ──────────────────────────────────────────── */
.branch-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}
.branch-tag-sandbox-east       { background: #dbeafe; color: #1d4ed8; }
.branch-tag-sandbox-greenhills { background: #dcfce7; color: #15803d; }

/* ── Actions column ─────────────────────────────────────────── */
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin-right: 4px; }
.actions-cell .btn:last-child { margin-right: 0; }

/* ── Detail grid (view modal) ───────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.detail-value {
  font-size: 14px;
  color: var(--text);
}
.detail-full { grid-column: 1 / -1; }
.detail-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: var(--radius);
}

/* ── Pending Concerns button ────────────────────────────────── */
.pending-btn {
  background: var(--primary-xlight);
  color: var(--primary);
  border: 1px solid var(--primary);
  position: relative;
}
.pending-btn:hover {
  background: var(--primary);
  color: #fff;
}
.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: #dc2626;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  padding: 0 5px;
}

/* ── Pending Panel (slide-in from right) ────────────────────── */
.pending-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.3);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.pending-overlay.open { opacity: 1; pointer-events: auto; }

.pending-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 30px rgba(0,0,0,.12);
  z-index: 160;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.pending-panel.open { transform: translateX(0); }

.pending-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.pending-panel-header h3 { font-size: 16px; font-weight: 600; margin: 0; }

.pending-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* ── Submission card in pending panel ─────────────────────────── */
.submission-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.submission-card:hover { border-color: var(--primary); }
.submission-card .sub-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.submission-card .sub-meta {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.submission-card .sub-desc {
  font-size: 12px;
  color: var(--text);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── File upload area ────────────────────────────────────────── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.file-upload-area:hover,
.file-upload-area.has-file { border-color: var(--primary); }
.file-upload-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-light);
}
.file-upload-area.has-file .file-upload-label {
  color: var(--primary);
  font-weight: 600;
}

/* ── PDF link ────────────────────────────────────────────────── */
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--primary);
  transition: all .15s;
}
.pdf-link:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ── Update Log Entries ─────────────────────────────────────── */
.update-log-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
  border-left: 2px solid var(--border);
  padding-left: 14px;
}
.log-entry {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
}
.log-entry:last-child { border-bottom: none; }
.log-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.log-content { flex: 1; min-width: 0; }
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.log-who { font-size: 12px; font-weight: 600; color: var(--text); }
.log-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.log-what { font-size: 13px; color: var(--text-light); line-height: 1.5; }
.log-remark {
  background: #eff6ff;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 2px 0;
}
.log-remark .log-what { color: #1d4ed8; }

/* ── View Modal Remark Input ──────────────────────────────── */
.view-remark-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.remark-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.remark-input {
  flex: 1;
  font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .pending-panel { width: 100vw; }
}
