/* ============================================================
   Next Steps Action View — Worker Task Authorisation
   Azia Light Theme — white/aqua palette
   ============================================================ */

/* When nextsteps is active, hide other elements */
body.nsa-active #expanded-title,
body.nsa-active #detail-panel,
body.nsa-active #bg-layer,
body.nsa-active #c4-link { display: none !important; }

/* ---- Container ---- */
#nextsteps-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #FEF3C7;
  color: #475569;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

#nextsteps-view::before {
  content: none;
}



/* ---- Header ---- */
.nsa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  z-index: 250;
  flex-shrink: 0;
  border-bottom: 2px solid #D97706;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nsa-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nsa-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #172351;
}

.nsa-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(71, 85, 105, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.nsa-header-right {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 3px;
}


/* ---- Filter Bar ---- */
.nsa-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  flex-shrink: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.95);
}

.nsa-filter-pills {
  display: flex;
  gap: 6px;
}

.nsa-filter-pill {
  padding: 5px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(71, 85, 105, 0.6);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nsa-filter-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
  border-color: rgba(0, 0, 0, 0.12);
}

.nsa-filter-active {
  background: rgba(6, 147, 227, 0.1);
  color: #0693E3;
  border-color: rgba(6, 147, 227, 0.3);
}

.nsa-summary-info {
  margin-left: auto;
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.5);
}


/* ---- Scroll Area (pending queue + cards) ---- */
.nsa-scroll-area {
  flex: 1;
  overflow-y: auto;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

/* ---- Cards Container ---- */
.nsa-cards {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ---- Worker Card ---- */
.nsa-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nsa-card:hover {
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nsa-card-authorised {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.04);
}

.nsa-card-skipped {
  opacity: 0.4;
  border-color: rgba(148, 163, 184, 0.1);
}

.nsa-card-picked-up {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
}

.nsa-card-completed {
  border-color: rgba(20, 184, 166, 0.3);
  background: rgba(20, 184, 166, 0.04);
}

.nsa-card-reallocated {
  opacity: 0.5;
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.04);
}

.nsa-card-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nsa-card-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.nsa-card-body {
  flex: 1;
  min-width: 0;
}

.nsa-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.nsa-card-worker {
  font-size: 0.95rem;
  font-weight: 600;
  color: #172351;
}

.nsa-card-role {
  font-size: 0.75rem;
  color: rgba(71, 85, 105, 0.5);
  margin-left: 6px;
}

.nsa-card-status {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
}

.nsa-status-pending {
  background: rgba(59, 130, 246, 0.15);
  color: rgba(96, 165, 250, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.nsa-status-authorised {
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.nsa-status-skipped {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.nsa-status-picked-up {
  background: rgba(245, 158, 11, 0.15);
  color: rgba(251, 191, 36, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.nsa-status-completed {
  background: rgba(20, 184, 166, 0.15);
  color: rgba(45, 212, 191, 0.9);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.nsa-status-reallocated {
  background: rgba(168, 85, 247, 0.15);
  color: rgba(192, 132, 252, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.nsa-card-step {
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.85);
  line-height: 1.4;
  margin-bottom: 6px;
}

.nsa-card-subs {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
}

.nsa-card-subs li {
  font-size: 0.78rem;
  color: rgba(71, 85, 105, 0.55);
  padding: 2px 0 2px 14px;
  position: relative;
}

.nsa-card-subs li::before {
  content: '\2022';
  position: absolute;
  left: 2px;
  color: rgba(6, 147, 227, 0.5);
}

.nsa-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.nsa-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-self: center;
}

.nsa-btn {
  padding: 7px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.8);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nsa-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}

.nsa-btn-authorise {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.25);
}

.nsa-btn-authorise:hover {
  background: rgba(34, 197, 94, 0.2);
}

.nsa-btn-skip {
  color: rgba(71, 85, 105, 0.5);
}


/* ---- Deadline Badge ---- */
.nsa-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.nsa-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.nsa-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.nsa-badge.green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.nsa-badge.grey {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
}


/* ---- Detail Panel (slides from right) ---- */
.nsa-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: #FFFFFF;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 200;
  overflow-y: auto;
  padding: 24px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.nsa-detail-open {
  transform: translateX(0);
  opacity: 1;
}

.nsa-detail-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.7);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.nsa-detail-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

.nsa-detail-worker-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-left: 40px;
}

.nsa-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.nsa-detail-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.nsa-detail-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #172351;
  line-height: 1.2;
}

.nsa-detail-role {
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.5);
}

.nsa-detail-proposed {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(71, 85, 105, 0.7);
  margin-bottom: 20px;
  padding: 14px;
  background: rgba(6, 147, 227, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(6, 147, 227, 0.1);
}

.nsa-detail-proposed-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(6, 147, 227, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.nsa-detail-subs {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.nsa-detail-subs li {
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.6);
  padding: 3px 0 3px 16px;
  position: relative;
}

.nsa-detail-subs li::before {
  content: '\2610';
  position: absolute;
  left: 0;
  color: rgba(6, 147, 227, 0.5);
}


/* ---- Detail Form ---- */
.nsa-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nsa-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nsa-form-group label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nsa-form-input,
.nsa-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: #475569;
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
  box-sizing: border-box;
}

.nsa-form-textarea {
  min-height: 80px;
  resize: vertical;
}

.nsa-form-input:focus,
.nsa-form-textarea:focus {
  outline: none;
  border-color: rgba(6, 147, 227, 0.4);
  box-shadow: 0 0 0 2px rgba(6, 147, 227, 0.15);
}

.nsa-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.nsa-detail-actions .nsa-btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
}


/* ---- Empty State ---- */
.nsa-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: rgba(71, 85, 105, 0.4);
}

.nsa-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.nsa-empty-text {
  font-size: 0.9rem;
}


/* ---- Reallocate Form ---- */
.nsa-reallocate-section {
  margin-top: 16px;
  padding: 14px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 8px;
}

.nsa-reallocate-section .nsa-form-group {
  margin-bottom: 12px;
}

.nsa-btn-reallocate {
  background: rgba(168, 85, 247, 0.12);
  color: rgba(192, 132, 252, 0.9);
  border-color: rgba(168, 85, 247, 0.25);
}

.nsa-btn-reallocate:hover {
  background: rgba(168, 85, 247, 0.2);
}

.nsa-btn-reallocate-confirm {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.15);
  color: rgba(192, 132, 252, 0.95);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nsa-btn-reallocate-confirm:hover {
  background: rgba(168, 85, 247, 0.25);
}


/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nsa-header { padding: 10px 16px; }
  .nsa-filter-bar { padding: 8px 16px; flex-wrap: wrap; }
  .nsa-cards { padding: 14px 16px; gap: 10px; }
  .nsa-card { padding: 14px; }

  .nsa-detail {
    width: 100%;
    border-left: none;
  }

  .nsa-subtitle { display: none; }
  .nsa-summary-info { display: none; }
  .nsa-card-actions { flex-direction: column; gap: 4px; }
}

/* ---- Inline Detail (expanded row) ---- */
.nsa-inline-detail {
  margin: 0 28px 8px;
  padding: 16px 20px;
  background: #fffdf7;
  border: 1px solid #f59e0b;
  border-top: none;
  border-radius: 0 0 10px 10px;
  animation: nsaSlideDown 0.2s ease;
}

@keyframes nsaSlideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 600px; }
}

.nsa-card-expanded {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-color: #f59e0b !important;
  margin-bottom: 0 !important;
}

.nsa-inline-proposed {
  background: rgba(217,119,6,0.08);
  border-left: 3px solid #D97706;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.nsa-inline-proposed-label {
  font-size: 10px;
  font-weight: 700;
  color: #D97706;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.nsa-inline-proposed-text {
  font-size: 14px;
  color: #1e293b;
  line-height: 1.4;
}

.nsa-inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nsa-inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ---- Pending Queue (Siobhan Review Gate) ---- */
.nsa-pending-queue {
  margin: 0 28px 16px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  overflow: hidden;
}

.nsa-pq-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fef3c7;
  border-bottom: 1px solid #f59e0b;
}

.nsa-pq-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nsa-pq-count {
  font-size: 12px;
  color: #b45309;
  font-weight: 600;
}

.nsa-pq-table-wrap {
  padding: 8px 16px 12px;
  overflow-x: auto;
}

.nsa-pq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.nsa-pq-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #fcd34d;
  position: sticky;
  top: 0;
  background: #fffbeb;
  z-index: 1;
}

.nsa-pq-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #fef3c7;
  color: #1e293b;
}
.nsa-pq-clickable:hover {
  background: rgba(245, 158, 11, 0.08) !important;
}

.nsa-pq-ref {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: #0D9488;
  font-weight: 600;
}

.nsa-pq-type {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.nsa-pq-type-task { background: #dbeafe; color: #1d4ed8; }
.nsa-pq-type-project { background: #d1fae5; color: #059669; }
.nsa-pq-type-routine { background: #fef3c7; color: #b45309; }

.nsa-pq-plan-yes { color: #059669; font-weight: 600; font-size: 12px; }
.nsa-pq-plan-no { color: #9ca3af; font-size: 12px; }
.nsa-pq-plan-link {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
}
.nsa-pq-plan-link:hover {
  color: #15803d;
}

.nsa-pq-approve {
  background: #0D9488;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.nsa-pq-approve:hover { background: #0f766e; }
.nsa-pq-approve:disabled { background: #9ca3af; cursor: default; }

/* Parent rows: bold + slightly larger */
.nsa-pq-table tbody tr:not(.nsa-pq-child-row):not(.nsa-pq-triad-missing) td {
  font-weight: 600;
  font-size: 0.88rem;
}
/* Child rows: lighter weight, smaller */
.nsa-pq-child-row td {
  padding-left: 4px;
  font-weight: 400;
  font-size: 0.8rem;
  color: #475569;
}
.nsa-pq-child-row td:first-child { padding-left: 20px; }
/* Triad documents section in project detail panel */
.nsa-pq-triad-docs { margin-bottom: 12px; padding: 8px 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; }
.nsa-pq-triad-doc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.nsa-pq-triad-doc-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.nsa-pq-triad-doc-link { color: #2563eb; text-decoration: underline; cursor: pointer; }
.nsa-pq-triad-doc-link:hover { color: #1d4ed8; }
.nsa-pq-triad-doc-pending { color: #9ca3af; font-style: italic; }
.nsa-pq-triad-doc-status { font-size: 14px; }
.nsa-pq-child-indent {
  color: #6b7280;
  font-size: 13px;
  margin-right: 2px;
}
.nsa-pq-blocked {
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
}

/* --- Project Triad: missing child row styling --- */
.nsa-pq-triad-missing td {
  background: rgba(245, 158, 11, 0.08) !important;
  border-bottom: 1px dashed #d97706;
}
.nsa-pq-triad-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nsa-pq-triad-missing-title {
  color: #92400e;
  font-style: italic;
  font-weight: 500;
}
.nsa-pq-triad-blocked {
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
}
.nsa-pq-triad-warn {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- Triad Progress Visual (Next Steps) ---- */
.nsa-triad-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nsa-triad-boxes {
  display: flex;
  gap: 2px;
}
.nsa-triad-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  min-width: 52px;
  text-align: center;
}
.nsa-triad-box.nsa-triad-complete {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.nsa-triad-box.nsa-triad-missing {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.nsa-triad-approve-disabled {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #e5e7eb;
  color: #9ca3af;
  border: 1px solid #d1d5db;
  cursor: default;
  white-space: nowrap;
}
.nsa-triad-approve-ready {
  background: #059669 !important;
  color: #fff !important;
  border-color: #047857 !important;
}
.nsa-pq-version {
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 3px;
  padding: 1px 6px;
}
.nsa-pq-version-missing {
  font-size: 11px;
  font-weight: 600;
  color: #dc2626;
}

/* ---- Edit pencil button ---- */
.nsa-pq-edit {
  background: none;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
}
.nsa-pq-edit:hover {
  background: rgba(6,147,227,0.08);
  color: #0693E3;
  border-color: rgba(6,147,227,0.25);
}

/* ---- Inline edit panel (below table row) ---- */
.nsa-pq-edit-row td {
  padding: 0 !important;
  border-bottom: 1px solid #fef3c7;
}

.nsa-pq-edit-panel {
  padding: 14px 16px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 0 0 8px 8px;
  margin: 0 8px 8px;
}

.nsa-pq-edit-label {
  font-size: 11px;
  font-weight: 700;
  color: #0D9488;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.nsa-pq-edit-notes {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fff;
  color: #1e293b;
  font-family: inherit;
  font-size: 13px;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}
.nsa-pq-edit-notes:focus {
  outline: none;
  border-color: rgba(13,148,136,0.4);
  box-shadow: 0 0 0 2px rgba(13,148,136,0.12);
}

.nsa-pq-edit-columns {
  display: flex;
  gap: 16px;
}
.nsa-pq-edit-col {
  flex: 1;
  min-width: 0;
}
.nsa-pq-actions-label {
  color: #7c3aed;
}
.nsa-pq-actions-taken {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid rgba(124,58,237,0.2);
  background: #faf5ff;
  color: #1e293b;
  font-family: inherit;
  font-size: 13px;
  border-radius: 6px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
}
.nsa-pq-no-actions {
  color: #94a3b8;
  font-style: italic;
}

.nsa-pq-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.nsa-pq-edit-reassign {
  padding: 6px 10px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  min-width: 120px;
}

.nsa-pq-save {
  background: #0693E3;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.nsa-pq-save:hover { background: #0574b8; }
.nsa-pq-save:disabled { background: #9ca3af; cursor: default; }

.nsa-pq-delete {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.nsa-pq-delete:hover { background: #dc2626; }
.nsa-pq-delete:disabled { background: #9ca3af; cursor: default; }

.nsa-pq-approve-dispatch {
  background: #059669;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.nsa-pq-approve-dispatch:hover { background: #047857; }
.nsa-pq-approve-dispatch:disabled { background: #9ca3af; cursor: default; }

.nsa-pq-empty {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 480px) {
  .nsa-header { padding: 8px 12px; }
  .nsa-filter-bar { padding: 6px 12px; gap: 8px; }
  .nsa-cards { padding: 10px 12px; gap: 8px; }
  .nsa-card { padding: 12px; flex-direction: column; }
  .nsa-card-actions { flex-wrap: wrap; }
  .nsa-pending-queue { margin: 0 12px 12px; }
}
