/* SEDTRACKER Online — Project Overview (timeline + panes) */

.cp-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.cp-overview-loading {
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(242, 245, 248, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}

.cp-overview-error {
  color: #ffb4b4;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  text-align: center;
}

.cp-overview-error-message {
  max-width: 28rem;
  line-height: 1.4;
}

.cp-overview-retry-btn {
  appearance: none;
  border: 1px solid rgba(255, 180, 180, 0.45);
  background: rgba(255, 180, 180, 0.12);
  color: #ffd6d6;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.cp-overview-retry-btn:hover {
  background: rgba(255, 180, 180, 0.2);
}

.cp-overview-retry-btn:focus-visible {
  outline: 2px solid rgba(255, 214, 214, 0.8);
  outline-offset: 2px;
}

.cp-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cp-overview-head-copy h3 {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.cp-overview-head-copy p {
  font-size: 11px;
  color: rgba(242, 245, 248, 0.62);
  margin-top: 2px;
}

.cp-overview-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cp-overview-pending-archive {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 130, 54, 0.55);
  border-radius: 8px;
  background: rgba(220, 130, 54, 0.14);
  color: #f2f5f8;
}

.cp-overview-pending-archive p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
}

.cp-overview-pending-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-overview-archive-notice {
  margin: 0 16px 10px;
  font-size: 13px;
  color: #d7e3ec;
}

.cp-overview-archive-notice.is-error {
  color: #ffb4a8;
}

.cp-overview-action-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(89, 183, 222, 0.8);
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  cursor: pointer;
  white-space: nowrap;
}

.cp-overview-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.cp-overview-action-btn.cp-overview-archive-btn {
  border-color: rgba(255, 255, 255, 0.28);
  background: #dc8236;
  color: #ffffff;
  text-transform: uppercase;
}

.cp-overview-action-btn.cp-overview-archive-btn:hover,
.cp-overview-action-btn.cp-overview-archive-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  background: #eb4203;
  color: #ffffff;
}

.cp-overview-left-archive-actions,
.cp-resource-archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cp-overview-pane-head-end,
.cp-overview-client-request-head-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.cp-overview-pane-head .cp-overview-left-archive-actions,
.cp-overview-client-request-head .cp-overview-left-archive-actions {
  margin-top: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.cp-overview-pane-head .cp-overview-archive-btn,
.cp-overview-client-request-head .cp-overview-archive-btn {
  padding: 4px 10px;
  font-size: 9px;
}

.cp-overview-draft-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240, 193, 75, 0.55);
  background: rgba(240, 193, 75, 0.16);
  color: #f0c14b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cp-overview-timeline {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px 14px 14px;
}

.cp-overview-timeline-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(242, 245, 248, 0.6);
  margin-bottom: 10px;
}

.cp-overview-timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.cp-overview-timeline-scroll::-webkit-scrollbar {
  height: 8px;
}

.cp-overview-timeline-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.cp-overview-timeline-track {
  position: relative;
  min-width: 100%;
}

.cp-overview-timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.cp-timeline-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-0.5px);
}

.cp-timeline-tick.has-flag {
  height: 15px;
  width: 2px;
  background: rgba(255, 255, 255, 0.75);
}

.cp-timeline-flag {
  position: absolute;
  transform: translateX(-2px);
  padding: 3px 8px;
  border-radius: 4px 4px 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(to bottom, #3d4248, #24282c);
  color: #f2f5f8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  z-index: 2;
  white-space: nowrap;
}

.cp-timeline-flag::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 100%;
  width: 1px;
  height: var(--cp-flag-drop, 14px);
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.cp-timeline-flag:hover {
  border-color: #59b7de;
}

.cp-timeline-flag.active {
  background: linear-gradient(to bottom, #43b06a, #2c7c48);
  border-color: #7ee3a4;
  box-shadow: 0 0 0 1px rgba(126, 227, 164, 0.5);
}

/* Visual-only markers from PDF `_Rn` hints — never interactive. */
.cp-timeline-flag.is-inferred {
  background: linear-gradient(to bottom, #5a5f66, #3a3e44);
  border: 1px dashed rgba(180, 186, 194, 0.75);
  color: rgba(220, 224, 230, 0.78);
  cursor: default;
  pointer-events: none;
  box-shadow: none;
  font-weight: 700;
}

.cp-timeline-flag.is-inferred:hover {
  border-color: rgba(180, 186, 194, 0.75);
  background: linear-gradient(to bottom, #5a5f66, #3a3e44);
}

.cp-timeline-flag.is-inferred::after {
  background: rgba(180, 186, 194, 0.35);
  border-left: 0;
}

.cp-overview-inferred-legend {
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(190, 196, 204, 0.72);
  pointer-events: none;
  user-select: none;
}

.cp-overview-panes {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  overflow: hidden;
}

/* Parallel tray is a panes-grid sibling under the right column — not inside .cp-overview-pane-right. */
.cp-overview-panes.is-parallel-on {
  grid-template-rows: minmax(0, 1fr) auto;
}

.cp-overview-panes.is-parallel-on > [data-cp-left-panel],
.cp-overview-panes.is-parallel-on > .cp-overview-pane-left {
  grid-column: 1;
  grid-row: 1 / -1; /* left keeps full panes height */
  min-height: 0;
}

.cp-overview-panes.is-parallel-on > [data-cp-right-panel],
.cp-overview-panes.is-parallel-on > .cp-overview-pane-right {
  grid-column: 2;
  grid-row: 1;
  min-height: 0; /* allow shrink so tray fits below without nesting inside */
  max-height: 100%;
}

.cp-overview-panes.is-parallel-on > [data-cp-parallel-tray],
.cp-overview-panes.is-parallel-on > .cp-parallel-view {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
}

.cp-overview-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #f5f6f7;
  color: #23272b;
  overflow: hidden;
  min-height: 260px;
}

.cp-overview-pane-left,
.cp-overview-pane-right {
  /* Independent column height/scroll; content must not spill under the sibling pane. */
  min-width: 0;
}

.cp-overview-pane-right {
  /* Right column: header/tools + deliveries scroll only (tray lives outside this panel). */
  overflow: hidden;
}

.cp-overview-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(to bottom, #2b3036, #1d2126);
  color: #f2f5f8;
}

.cp-overview-pane-head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.cp-overview-pane-head-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cp-overview-sort-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(242, 245, 248, 0.9);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
}

.cp-overview-sort-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.cp-overview-sort-btn:focus-visible {
  outline: 2px solid #7ee3a4;
  outline-offset: 1px;
}

.cp-overview-view-toggle {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}

.cp-overview-view-toggle-btn {
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(242, 245, 248, 0.78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  cursor: pointer;
}

.cp-overview-view-toggle-btn + .cp-overview-view-toggle-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.cp-overview-view-toggle-btn.is-active {
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
}

.cp-overview-view-toggle-btn:focus-visible {
  outline: 2px solid #7ee3a4;
  outline-offset: -2px;
  z-index: 1;
}

.cp-overview-flag-download-bar {
  display: flex;
  justify-content: flex-end;
}

.cp-overview-files-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
}

.cp-overview-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
  align-content: start;
}

.cp-overview-attachment-delivery-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(16, 18, 20, 0.82);
  color: #ffffff;
  pointer-events: none;
}

.cp-overview-pane-tag {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
}

.cp-overview-pane-tag-working {
  background: rgba(89, 183, 222, 0.45);
}

.cp-overview-pane-tag-queue {
  background: rgba(214, 162, 72, 0.55);
}

.cp-overview-pane-tag-pending {
  background: rgba(140, 148, 156, 0.55);
}

.cp-overview-pane-tag-completed {
  background: rgba(67, 176, 106, 0.6);
}

.cp-overview-sent-submitted {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(35, 39, 43, 0.62);
}

.cp-overview-pane-flag {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #43b06a, #2c7c48);
}

.cp-overview-pane-date {
  font-size: 10px;
  font-weight: 700;
  color: rgba(242, 245, 248, 0.72);
}

.cp-overview-pane-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-overview-message {
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}

.cp-overview-message-empty {
  color: rgba(35, 39, 43, 0.55);
  font-style: italic;
}

.cp-overview-sent-title {
  font-size: 12px;
  font-weight: 900;
}

.cp-overview-deliveries {
  display: grid;
  gap: 14px;
  align-content: start;
}

.cp-overview-delivery {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(35, 39, 43, 0.12);
}

.cp-overview-delivery:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cp-overview-delivery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cp-overview-delivery-index {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: rgba(35, 39, 43, 0.55);
  text-transform: uppercase;
}

.cp-overview-trace-meta,
.cp-overview-client-request-meta {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(35, 39, 43, 0.5);
}

.cp-overview-client-requests,
.cp-overview-deliveries {
  min-height: 0;
  align-content: start;
}

.cp-overview-client-requests {
  display: grid;
  gap: 14px;
}

.cp-overview-client-request {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(35, 39, 43, 0.12);
}

.cp-overview-client-request:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cp-overview-client-request-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-overview-project-record-note,
.cp-overview-delivery-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(35, 39, 43, 0.62);
}

.cp-overview-pane-project-record .cp-overview-pane-body,
.cp-overview-pane-project-record .cp-overview-right-scroll {
  /* Each scroll region stays independent; do not chain scroll to the sibling tray. */
  overscroll-behavior: contain;
}

.cp-overview-nodata {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.cp-overview-nodata-badge {
  padding: 6px 14px;
  border-radius: 4px;
  background: #2b3036;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.cp-overview-nodata p {
  max-width: 380px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(35, 39, 43, 0.75);
}

.cp-overview-send-note-bar {
  margin-top: 8px;
}

.cp-overview-send-note-btn {
  padding: 7px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  cursor: pointer;
}

.cp-overview-send-note-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.cp-overview-attachments-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(35, 39, 43, 0.12);
  display: grid;
  gap: 8px;
}

.cp-overview-attachments-toolbar {
  display: flex;
  justify-content: flex-end;
}

.cp-overview-download-all {
  border: 1px solid rgba(35, 39, 43, 0.22);
  background: linear-gradient(to bottom, #f7f8f9, #eceff2);
  color: #23272b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.cp-overview-download-all:hover:not(:disabled) {
  background: linear-gradient(to bottom, #ffffff, #e7ebef);
  border-color: rgba(47, 131, 177, 0.45);
}

.cp-overview-download-all:disabled {
  opacity: 0.65;
  cursor: progress;
}

.cp-overview-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-overview-attachment-wrap {
  position: relative;
  width: 84px;
}

.cp-overview-attachment-wrap.is-image {
  width: 112px;
}

.cp-overview-attachment-thumb {
  width: 100px;
  height: 122px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(35, 39, 43, 0.18);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
  display: block;
}

.cp-overview-attachment {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  padding: 4px;
  border-radius: 8px;
}

.cp-overview-attachment-wrap:hover .cp-overview-attachment,
.cp-overview-attachment:hover {
  background: rgba(35, 39, 43, 0.08);
}

.cp-overview-attachment-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
  z-index: 2;
}

.cp-overview-attachment-download,
.cp-overview-attachment-replace {
  position: static;
  width: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(16, 18, 20, 0.78);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 20px;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.cp-overview-attachment-download {
  width: 22px;
  padding: 0;
  font-size: 12px;
}

.cp-overview-attachment-wrap:hover .cp-overview-attachment-download,
.cp-overview-attachment-wrap:hover .cp-overview-attachment-replace,
.cp-overview-attachment-wrap:focus-within .cp-overview-attachment-download,
.cp-overview-attachment-wrap:focus-within .cp-overview-attachment-replace {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) {
  .cp-overview-attachment-download,
  .cp-overview-attachment-replace {
    opacity: 1;
    pointer-events: auto;
  }
}

.cp-overview-attachment-download:focus-visible,
.cp-overview-attachment-replace:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid #2f83b1;
  outline-offset: 1px;
}

.cp-overview-attachment-download:hover,
.cp-overview-attachment-replace:hover {
  background: rgba(47, 131, 177, 0.95);
}

.cp-overview-attachment.is-loading {
  opacity: 0.55;
  cursor: progress;
  animation: cp-attachment-pulse 1s ease-in-out infinite;
}

.cp-overview-attachment.is-error .cp-overview-attachment-name {
  color: #b13232;
}

@keyframes cp-attachment-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

.cp-overview-attachment-icon {
  width: 46px;
  height: 56px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(to bottom, #6b7280, #4b5158);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.cp-overview-attachment-icon[data-kind="pdf"] {
  background: linear-gradient(to bottom, #e05252, #a83232);
}

.cp-overview-attachment-icon[data-kind="image"] {
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
}

.cp-overview-attachment-icon[data-kind="doc"] {
  background: linear-gradient(to bottom, #4f7adc, #2f52b1);
}

.cp-overview-attachment-icon[data-kind="xls"] {
  background: linear-gradient(to bottom, #43b06a, #2c7c48);
}

.cp-overview-attachment-icon[data-kind="zip"] {
  background: linear-gradient(to bottom, #c9a34f, #8f6f2c);
}

.cp-overview-attachment-name {
  max-width: 84px;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
  color: rgba(35, 39, 43, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-overview-attachment-wrap.is-image .cp-overview-attachment-name {
  max-width: 112px;
}

@media (max-width: 1100px) {
  .cp-overview-panes {
    grid-template-columns: 1fr;
  }

  .cp-overview-panes.is-parallel-on {
    grid-template-rows: auto auto auto;
  }

  .cp-overview-panes.is-parallel-on > [data-cp-left-panel],
  .cp-overview-panes.is-parallel-on > .cp-overview-pane-left,
  .cp-overview-panes.is-parallel-on > [data-cp-right-panel],
  .cp-overview-panes.is-parallel-on > .cp-overview-pane-right,
  .cp-overview-panes.is-parallel-on > [data-cp-parallel-tray],
  .cp-overview-panes.is-parallel-on > .cp-parallel-view {
    grid-column: 1;
    grid-row: auto;
  }
}

/* --- Request Revision modal --- */
.cp-rev-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 8, 12, 0.72);
}

.cp-rev-modal-card {
  width: min(720px, 96vw);
  max-height: min(900px, 94vh);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(to bottom, #2b3036, #1a1d21);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  color: #f2f5f8;
}

.cp-rev-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-rev-modal-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.6px;
}

.cp-rev-modal-project {
  margin: 4px 0 0;
  font-size: 11px;
  color: rgba(242, 245, 248, 0.66);
}

.cp-rev-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 18px;
  cursor: pointer;
}

.cp-rev-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.cp-rev-field {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: rgba(242, 245, 248, 0.72);
  text-transform: uppercase;
}

.cp-rev-field input[type="text"],
.cp-rev-field textarea {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #2a2e33;
  color: #f2f5f8;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 10px 12px;
  font-family: inherit;
}

.cp-rev-field textarea {
  min-height: 140px;
  max-height: 260px;
  resize: vertical;
  line-height: 1.45;
}

.cp-rev-field input[aria-invalid="true"],
.cp-rev-field textarea[aria-invalid="true"],
.cp-rev-dropzone[aria-invalid="true"] {
  border-color: rgba(255, 180, 180, 0.75);
}

.cp-rev-btn:disabled,
.cp-rev-modal-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cp-rev-hint {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(242, 245, 248, 0.5);
}

.cp-rev-dropzone {
  border: 1px dashed rgba(159, 215, 239, 0.45);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: rgba(0, 0, 0, 0.18);
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}

.cp-rev-dropzone.is-dragover {
  border-color: #59b7de;
  background: rgba(89, 183, 222, 0.12);
}

.cp-rev-browse-btn,
.cp-rev-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
}

.cp-rev-btn-primary {
  border-color: rgba(89, 183, 222, 0.55);
  background: rgba(89, 183, 222, 0.18);
  color: #9fd7ef;
}

.cp-rev-btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Confirm-modal message paragraph only. Chrome reuses .cp-rev-modal / .cp-rev-modal-card
   / .cp-rev-btn-*. .cp-rev-field is uppercase/small; this copy must stay sentence-case. */
.cp-rev-select-copy {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: #f2f5f8;
}

.cp-rev-select-modal .cp-rev-btn-primary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  box-shadow: none;
}

.cp-rev-select-modal .cp-rev-btn-primary:disabled {
  cursor: not-allowed;
}

.cp-rev-select-modal .cp-rev-btn-secondary:hover:not(:disabled) {
  background: rgba(217, 83, 79, 0.4);
  border-color: rgba(217, 83, 79, 0.7);
  color: #ffffff;
}

.cp-rev-select-modal .cp-rev-btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.cp-rev-select-modal .cp-rev-modal-close:hover {
  background: rgba(217, 83, 79, 0.4);
  border-color: rgba(217, 83, 79, 0.7);
  color: #ffffff;
}

.cp-rev-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}

.cp-rev-file-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
}

.cp-rev-file-remove {
  border: none;
  background: transparent;
  color: #ffb4b4;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.cp-rev-error {
  color: #ffb4b4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.cp-rev-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #9fd7ef;
}

.cp-rev-status[data-tone="error"] { color: #ffb4b4; }
.cp-rev-status[data-tone="success"] { color: #9fe0ab; }

.cp-rev-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .cp-rev-modal,
  .cp-rev-modal-card {
    transition: none;
  }
}

/* —— Parallel View (Overview PDF comparator) —— */

.cp-overview-right-tools {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px 0;
  min-height: 0;
}

.cp-overview-right-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}

.cp-overview-parallel-tools-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.cp-parallel-toggle-bar,
.cp-pdf-only-toggle-bar {
  display: flex;
  justify-content: flex-start;
}

.cp-parallel-toggle-btn,
.cp-pdf-only-toggle-btn {
  border: 1px solid rgba(35, 39, 43, 0.22);
  border-radius: 7px;
  background: linear-gradient(to bottom, #2b3036, #1d2126);
  color: rgba(242, 245, 248, 0.88);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
}

.cp-parallel-toggle-btn.is-on,
.cp-pdf-only-toggle-btn.is-on {
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
  border-color: rgba(79, 176, 220, 0.55);
}

.cp-parallel-toggle-btn:focus-visible,
.cp-pdf-only-toggle-btn:focus-visible {
  outline: 2px solid #7ee3a4;
  outline-offset: 2px;
}

.cp-parallel-view {
  flex: none;
  height: clamp(210px, 28vh, 280px);
  max-height: min(280px, 38vh);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto; /* last resort only when the tray itself is height-constrained */
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(to bottom, #2b3036, #1a1d21);
  color: #f2f5f8;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-parallel-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cp-parallel-view-head strong {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.cp-parallel-view-head span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: rgba(242, 245, 248, 0.65);
}

.cp-parallel-view-close {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.cp-parallel-view-close:hover {
  background: rgba(217, 83, 79, 0.4);
}

.cp-parallel-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  align-content: start;
}

.cp-parallel-slot {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  min-height: 108px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-parallel-slot.is-filled {
  border-style: solid;
  border-color: rgba(79, 176, 220, 0.45);
}

.cp-parallel-slot.is-unavailable {
  border-color: rgba(217, 83, 79, 0.55);
}

.cp-parallel-slot-unavailable {
  color: #ffb4b4;
  font-size: 10px;
  font-weight: 700;
}

.cp-parallel-slot.is-dragover {
  border-color: #7ee3a4;
  background: rgba(126, 227, 164, 0.12);
}

.cp-parallel-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  height: 100%;
}

.cp-parallel-slot-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(242, 245, 248, 0.7);
}

.cp-parallel-slot-empty p {
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(242, 245, 248, 0.55);
}

.cp-parallel-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cp-parallel-slot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(217, 83, 79, 0.55);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.cp-parallel-slot-remove {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.cp-parallel-slot-remove:hover {
  background: rgba(217, 83, 79, 0.45);
}

.cp-parallel-slot-name {
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-parallel-slot-meta {
  font-size: 10px;
  color: rgba(242, 245, 248, 0.55);
}

.cp-parallel-browse {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  color: #d7eef8;
  background: rgba(255, 255, 255, 0.06);
}

.cp-parallel-browse input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.cp-parallel-browse:focus-within {
  outline: 2px solid #7ee3a4;
  outline-offset: 1px;
}

.cp-parallel-error {
  font-size: 11px;
  color: #ffb4b4;
}

.cp-parallel-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-top: auto;
}

.cp-parallel-compare-btn {
  border: none;
  border-radius: 7px;
  background: linear-gradient(to bottom, #4fb0dc, #2f83b1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
}

.cp-parallel-compare-btn:disabled,
.cp-parallel-compare-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.cp-parallel-compare-btn:not(:disabled):focus-visible {
  outline: 2px solid #7ee3a4;
  outline-offset: 2px;
}

.cp-parallel-view-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 12, 0.78);
  padding: 18px;
}

.cp-parallel-view-modal.hidden {
  display: none;
}

.cp-parallel-view-modal-card {
  width: min(1600px, 98vw);
  height: calc(100vh - 36px);
  height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(to bottom, #2b3036, #1a1d21);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

/* 3-PDF compare: span roughly sidebar + Display Panel width */
.cp-parallel-view-modal-card.is-cols-3 {
  width: min(calc(100vw - 24px), 2400px);
  max-width: calc(100vw - 24px);
}

.cp-parallel-view-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #16191d, #0b0d0f);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.cp-parallel-view-modal-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9fd7ef;
}

.cp-parallel-view-modal-head h3 {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #f2f5f8;
}

.cp-parallel-view-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 18px;
  cursor: pointer;
}

.cp-parallel-view-modal-close:hover {
  background: rgba(217, 83, 79, 0.4);
}

.cp-parallel-view-modal-body {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #101214;
  overflow: auto;
}

.cp-parallel-view-modal-body.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cp-parallel-view-modal-body.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cp-parallel-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: #0c0e10;
}

.cp-parallel-column-head {
  flex-shrink: 0;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-parallel-column-head h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #f2f5f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-parallel-column-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #101214;
}

.cp-parallel-column-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #101214;
}

.cp-parallel-column-loading,
.cp-parallel-column-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(242, 245, 248, 0.8);
  background: rgba(16, 18, 20, 0.92);
  z-index: 1;
}

.cp-parallel-column-error {
  color: #ffb4b4;
  flex-direction: column;
  gap: 12px;
}

.cp-parallel-column-retry {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.cp-parallel-column-retry.hidden {
  display: none;
}

.cp-parallel-column-loading.hidden,
.cp-parallel-column-error.hidden,
.cp-parallel-column-frame.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .cp-parallel-view-modal-body.cols-3 {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    overflow-x: auto;
  }

  /* Keep three slots in one row; scroll horizontally instead of stacking. */
  .cp-parallel-slots {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

@media (max-width: 860px) {
  .cp-parallel-view-modal-body.cols-2,
  .cp-parallel-view-modal-body.cols-3 {
    grid-template-columns: minmax(280px, 1fr);
    overflow-x: auto;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
  }

  .cp-parallel-view {
    height: clamp(190px, 32vh, 260px);
  }
}

/* —— Portal notes (Client → Designer/Supervisor) —— */

.cp-overview-pane:has(> .pn-note-composer-host) {
  background: linear-gradient(to bottom, #1a1d21, #121417);
  color: #f2f5f8;
  border-color: rgba(255, 255, 255, 0.16);
}

.pn-note-composer-host {
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 12px 14px 14px;
  background: transparent;
  color: #f2f5f8;
}

.pn-note-composer-host .pn-note-draft,
.pn-note-composer-host .cp-np-draft {
  min-height: 100%;
  color: #f2f5f8;
}

.pn-note-composer-host .cp-np-draft-title {
  color: #f2f5f8;
}

.pn-note-composer-host .cp-np-form {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.14);
}

.cp-overview-send-note-btn:not(:disabled):hover {
  filter: brightness(1.06);
}

.pn-note-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.pn-note-list-toolbar {
  display: flex;
  justify-content: flex-end;
}

.pn-note-sort {
  border: 1px solid rgba(35, 39, 43, 0.22);
  background: linear-gradient(to bottom, #f7f8f9, #eceff2);
  color: #23272b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.pn-note-sort:hover {
  background: linear-gradient(to bottom, #ffffff, #e7ebef);
  border-color: rgba(47, 131, 177, 0.45);
}

.pn-note {
  display: grid;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: 8px;
  border: 1px solid rgba(47, 131, 177, 0.28);
  background: linear-gradient(to bottom, #f4f8fb, #e7eef3);
  box-shadow: 0 6px 16px rgba(16, 24, 32, 0.08);
}

.pn-note.is-highlight {
  outline: 2px solid #2f83b1;
  animation: pn-note-flash 1.2s ease;
}

@keyframes pn-note-flash {
  0% { box-shadow: 0 0 0 0 rgba(47, 131, 177, 0.55); }
  100% { box-shadow: 0 6px 16px rgba(16, 24, 32, 0.08); }
}

.pn-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.pn-note-rev {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1d4f6e;
}

.pn-note-author {
  font-size: 12px;
  font-weight: 800;
  color: #1d4f6e;
}

.pn-note-time {
  font-size: 11px;
  color: rgba(35, 39, 43, 0.58);
  margin-left: auto;
}

.pn-note-read-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pn-note-read-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4f6e;
}

.pn-note-read-action {
  border: 1px solid rgba(47, 131, 177, 0.35);
  background: #fff;
  color: #1d4f6e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.pn-note-read-action:disabled {
  opacity: 0.55;
  cursor: progress;
}

.pn-note-read-error {
  margin: 0;
  font-size: 11px;
  color: #a83232;
}

.pn-note-delete {
  border: 1px solid rgba(177, 50, 50, 0.35);
  background: #fff;
  color: #a83232;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}

.pn-note-html {
  font-size: 12px;
  line-height: 1.5;
  color: #23272b;
}

.pn-note-html p {
  margin: 0 0 0.4em;
}

.pn-note-html a {
  color: #2f83b1;
}

.pn-note-files {
  margin-top: 2px;
  padding-top: 8px;
}
