/* TS01 — Project Control Room workspace (Slice 1.1 — corrective).
   Approved TS01 screen-design direction: LIGHT/WHITE main workspace surface,
   scoped to this dashboard (no broad shell redesign). The surrounding Explorer
   shell remains untouched. */

.pc-dashboard {
  box-sizing: border-box;
  min-height: 100%;
  padding: 20px 22px 28px;
  background: linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
  color: #0f172a;
  font-size: 14px;
}

.pc-dashboard *,
.pc-dashboard *::before,
.pc-dashboard *::after {
  box-sizing: border-box;
}

/* ---- Header ---- */
.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.pc-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
}

.pc-title-lg {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.pc-lead {
  margin: 6px 0 0;
  max-width: 900px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.pc-content {
  display: block;
}

.pc-status {
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  color: #64748b;
}

/* ---- Summary / notice rail ---- */
.pc-summary {
  margin-bottom: 12px;
}

.pc-summary p {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.pc-summary.pc-notice-success {
  padding: 10px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #047857;
}

.pc-summary.pc-notice-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
}

/* ---- Panel + table ---- */
.pc-panel {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pc-table-panel {
  overflow: hidden;
}

.pc-table-scroll {
  overflow-x: auto;
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
}

.pc-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e5e9f0;
  white-space: nowrap;
}

.pc-table td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid #eef1f6;
}

.pc-table tbody tr:last-child > td {
  border-bottom: none;
}

.pc-table tbody tr[data-pc-work-item]:hover {
  background: #f8fafc;
}

.pc-cell-work {
  display: table-cell;
  white-space: nowrap;
}

.pc-work-name {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.pc-work-name strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
}

.pc-title {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.pc-parent-hint {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.pc-empty-hint {
  color: #94a3b8;
  font-size: 12px;
}

.pc-error-text {
  color: #b91c1c;
  font-size: 13px;
}

.pc-muted {
  color: #94a3b8;
}

.pc-refs {
  max-width: 170px;
}

/* ---- Chips / rel / badges ---- */
.pc-chip {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 11px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 1px 8px;
  margin: 1px 3px 1px 0;
}

.pc-rel {
  font-size: 11px;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pc-badge-plan { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.pc-badge-design { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.pc-badge-prepare { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.pc-badge-ready { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pc-badge-execute { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.pc-badge-under-review { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }
.pc-badge-completed { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.pc-badge-reopened { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* ---- "+" record-detail toggle (operational governed control) ---- */
.pc-toggle-detail {
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 15px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  cursor: pointer;
  vertical-align: middle;
}

.pc-toggle-detail:hover {
  background: #dbeafe;
}

.pc-toggle-detail[aria-expanded="true"] {
  background: #dbeafe;
}

/* ---- Expanded record detail ---- */
.pc-detail-row > td {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px 12px 14px;
}

.pc-detail-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}

.pc-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.pc-detail-field h4 {
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pc-detail-field p {
  margin: 4px 0;
  font-size: 13px;
  color: #334155;
}

.pc-detail-field:first-child h4 {
  margin-top: 0;
}

.pc-checklist {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.pc-checklist li {
  font-size: 13px;
  color: #94a3b8;
  padding: 2px 0;
}

.pc-checklist li.is-done {
  color: #047857;
}

.pc-events {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

.pc-event {
  border-left: 3px solid #bfdbfe;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.pc-event-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.pc-event-type {
  font-size: 12px;
  font-weight: 700;
  color: #1e40af;
}

.pc-event-when {
  font-size: 11px;
  color: #94a3b8;
}

.pc-event-detail {
  font-size: 12px;
  color: #475569;
  margin-top: 3px;
}

.pc-event-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-style: italic;
}

.pc-detail-boundary {
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

/* ---- Buttons ---- */
.pc-btn {
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  border: 1px solid transparent;
}

.pc-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pc-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.pc-btn-primary:hover {
  background: #1d4ed8;
}

.pc-btn-ghost {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.pc-btn-ghost:hover {
  background: #f8fafc;
}

.pc-btn-soft {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  padding: 4px 8px;
  margin: 1px 4px 1px 0;
}

.pc-btn-soft:hover {
  background: #dbeafe;
}

/* ---- Governed in-application confirmation dialog ---- */
.pc-dialog {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #0f172a;
}

.pc-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.pc-dialog-panel {
  position: relative;
  width: min(480px, calc(100vw - 48px));
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.pc-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f6;
}

.pc-dialog-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.pc-dialog-x {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.pc-dialog-body {
  padding: 16px 18px;
}

.pc-dialog-rows {
  margin: 0;
}

.pc-dialog-rows > div {
  display: flex;
  gap: 12px;
  padding: 5px 0;
}

.pc-dialog-rows dt {
  width: 130px;
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.pc-dialog-rows dd {
  margin: 0;
  font-size: 13px;
  color: #1e293b;
}

.pc-dialog-audit {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #075985;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.pc-dialog-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #b91c1c;
}

.pc-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #eef1f6;
}

@media (max-width: 1100px) {
  .pc-detail-grid {
    grid-template-columns: 1fr;
  }
}

