[hidden] {
  display: none !important;
}

.workspace-sidebar nav button {
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  color: #6b8088;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.pipeline-view {
  min-height: 660px;
  margin-top: 18px;
}

.pipeline-card {
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 24px;
  background: rgba(255, 255, 255, .42);
  box-shadow: 0 22px 55px rgba(45, 79, 87, .1), inset 0 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(24px) saturate(145%);
}

.pipeline-card + .pipeline-card {
  margin-top: 18px;
}

.pipeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-heading .eyebrow {
  margin: 0 0 4px;
}

.pipeline-heading h3 {
  margin: 0;
  color: #203943;
  font-size: 22px;
  letter-spacing: -.025em;
}

.pipeline-pulse {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  gap: 22px;
  margin-top: 18px;
  padding: 15px 18px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 18px;
  background: rgba(255, 255, 255, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.pipeline-pulse-copy p {
  margin: 0 0 4px;
  color: #176c70;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .11em;
}

.pipeline-pulse-copy span {
  color: #667b84;
  font-size: 11.5px;
}

.pipeline-pulse-stats {
  display: flex;
  align-items: center;
}

.pipeline-pulse-stats > div {
  display: grid;
  min-width: 82px;
  gap: 2px;
  padding: 2px 17px;
  border-left: 1px solid rgba(91, 126, 134, .16);
  text-align: center;
}

.pipeline-pulse-stats strong {
  color: #2f4953;
  font-size: 20px;
  letter-spacing: -.03em;
}

.pipeline-pulse-stats span {
  color: #7a8c93;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.pipeline-pulse-stats .is-watchlist strong { color: #b57920; }
.pipeline-pulse-stats .is-won strong { color: #148269; }

.stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.stage-card {
  min-width: 0;
  --stage-accent: #6366f1;
  --stage-halo: rgba(99, 102, 241, .2);
  position: relative;
  min-height: 168px;
  padding: 15px 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  background: rgba(255, 255, 255, .43);
  box-shadow: 0 16px 32px -24px var(--stage-halo), inset 0 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(18px) saturate(115%);
}

.stage-card.stage-early { --stage-accent: #3b82f6; --stage-halo: rgba(59, 130, 246, .22); }
.stage-card.stage-work { --stage-accent: #6366f1; --stage-halo: rgba(99, 102, 241, .22); }
.stage-card.stage-action { --stage-accent: #f59e0b; --stage-halo: rgba(245, 158, 11, .25); }
.stage-card.stage-won { --stage-accent: #10b981; --stage-halo: rgba(16, 185, 129, .26); }
.stage-card.stage-lost { --stage-accent: #94a3b8; --stage-halo: rgba(148, 163, 184, .18); }

.stage-accent {
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--stage-accent);
  opacity: .86;
}

.stage-heading {
  display: flex;
  min-height: 44px;
  gap: 9px;
  align-items: flex-start;
}

.stage-heading > div {
  min-width: 0;
  flex: 1;
}

.stage-heading strong {
  color: #263e48;
  font-size: 13px;
}

.stage-heading p {
  margin: 4px 0 0;
  color: #819097;
  font-size: 9.5px;
  line-height: 1.3;
}

.stage-number {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border-radius: 8px;
  color: var(--stage-accent);
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 0 0 1px var(--stage-halo);
  font-size: 10px;
  font-weight: 850;
}

.stage-count {
  display: grid;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  place-items: center;
  border-radius: 8px;
  color: #5f737b;
  background: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-weight: 850;
}

.opportunity-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.opportunity-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 12px;
  background: rgba(255, 255, 255, .66);
  box-shadow: 0 7px 16px rgba(34, 68, 79, .04), inset 0 1px 0 rgba(255, 255, 255, .86);
}

.opportunity-card[open] {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 28px rgba(34, 68, 79, .1), inset 0 1px 0 white;
}

.opportunity-card > summary {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 10px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.opportunity-card > summary::-webkit-details-marker { display: none; }

.opportunity-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--stage-accent);
  box-shadow: 0 0 0 3px var(--stage-halo);
}

.opportunity-identity {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.opportunity-identity strong,
.opportunity-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-identity strong {
  color: #263e48;
  font-size: 11.5px;
}

.opportunity-identity small {
  color: #7c8d94;
  font-size: 9.5px;
}

.opportunity-status {
  padding: 4px 6px;
  border-radius: 7px;
  color: #557078;
  background: #edf3f3;
  font-size: 8px;
  font-weight: 800;
  text-transform: capitalize;
}

.opportunity-chevron {
  color: #71858c;
  font-size: 17px;
  line-height: 1;
  transform: rotate(0);
  transition: transform .18s ease;
}

.opportunity-card[open] .opportunity-chevron { transform: rotate(90deg); }

.opportunity-detail {
  min-width: 0;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(98, 133, 139, .13);
}

.contract-panel,
.contract-form,
.stage-correction-form {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
}

.contract-panel + .contract-form {
  border-top: 1px solid #d7e4e6;
}

.contract-panel strong,
.contract-panel span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-panel strong { font-size: 11px; }
.contract-panel span { color: #71858c; font-size: 9.5px; }
.contract-panel .contract-field { white-space: normal; }

.contract-actions,
.contract-form,
.stage-correction-form {
  grid-template-columns: minmax(0, 1fr);
}

.contract-actions {
  display: grid;
  gap: 7px;
}

.contract-inputs {
  display: grid;
  gap: 7px;
}

.contract-inputs label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.contract-form input,
.contract-form select,
.stage-correction-form input,
.stage-correction-form select {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #c7d9dc;
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}

.contract-type-choice {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-transform: capitalize;
}

.contract-panel button,
.contract-form button,
.stage-correction-form button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #257889;
  font-size: 10px;
  font-weight: 750;
}

.contract-panel button.reject {
  color: #7e3333;
  background: #f5dede;
}

@media (min-width: 801px) and (max-width: 1200px) {
  .stage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-pulse { grid-template-columns: 1fr; }
  .pipeline-pulse-stats { justify-content: flex-start; }
  .pipeline-pulse-stats > div:first-child { border-left: 0; padding-left: 0; }
}

@media (max-width: 800px) {
  .pipeline-view { min-height: 0; }
  .pipeline-card { padding: 15px 12px 18px; border-radius: 20px; }
  .pipeline-pulse { grid-template-columns: 1fr; gap: 13px; padding: 14px; }
  .pipeline-pulse-stats { overflow-x: auto; }
  .pipeline-pulse-stats > div { min-width: 74px; padding: 2px 11px; }
  .pipeline-pulse-stats > div:first-child { border-left: 0; padding-left: 0; }
  .stage-list {
    display: flex;
    gap: 11px;
    margin-right: -12px;
    padding: 0 12px 8px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .stage-list::-webkit-scrollbar { display: none; }
  .stage-card { min-height: 220px; flex: 0 0 82vw; scroll-snap-align: center; }
}
