/* Área Personalizados — timeline + histórico (tema portal) */

.portal-ops-page .portal-hero__title {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.portal-ops-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.portal-ops-filter {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 120, 0.14);
  background: rgba(255, 200, 90, 0.04);
  color: rgba(255, 210, 140, 0.55);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.portal-ops-filter:hover {
  border-color: rgba(255, 210, 120, 0.28);
  color: rgba(255, 228, 170, 0.88);
}

.portal-ops-filter.is-active {
  background: rgba(255, 200, 90, 0.14);
  border-color: rgba(255, 210, 120, 0.32);
  color: rgba(255, 228, 170, 0.95);
}

.portal-ops-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portal-ops-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

@media (min-width: 901px) {
  .portal-ops-list {
    margin-right: -2px;
  }
}

.portal-ops-list__item {
  width: 100%;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 120, 0.1);
  background: linear-gradient(155deg, rgba(18, 14, 10, 0.96), rgba(8, 6, 5, 0.98));
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.portal-ops-list__item.is-hidden {
  display: none;
}

.portal-ops-list__item:hover {
  border-color: rgba(255, 210, 120, 0.22);
  transform: translateY(-1px);
}

.portal-ops-list__item.is-active {
  border-color: rgba(255, 200, 90, 0.38);
  background: linear-gradient(155deg, rgba(28, 22, 14, 0.98), rgba(12, 9, 6, 0.99));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.portal-ops-list__item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.portal-ops-list__op {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 196, 100, 0.45);
}

.portal-ops-list__product {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 236, 210, 0.9);
}

.portal-ops-list__qty {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 210, 140, 0.42);
}

.portal-ops-detail {
  padding: 20px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 210, 120, 0.12);
  background: linear-gradient(155deg, rgba(18, 14, 10, 0.96), rgba(8, 6, 5, 0.98));
}

.portal-ops-detail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: rgba(255, 210, 140, 0.45);
  font-size: 14px;
}

.portal-ops-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.portal-ops-detail__eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 196, 100, 0.42);
}

.portal-ops-detail__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
}

.portal-ops-detail__meta {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 210, 140, 0.48);
}

.portal-ops-detail__eta {
  margin: 0 0 4px;
  font-size: 12px;
  color: rgba(255, 200, 120, 0.72);
}

.portal-ops-detail__consultant {
  margin: 0 0 18px;
  font-size: 11px;
  color: rgba(255, 210, 140, 0.38);
}

.portal-ops-detail__section {
  margin-bottom: 20px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 210, 120, 0.08);
}

.portal-ops-detail__section-title {
  margin: 14px 0 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 196, 100, 0.45);
}

/* Timeline — base ecom-op-tl adaptada (sem scroll horizontal no desktop) */
.portal-ops-tl-scroll {
  overflow: visible;
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-width: 0;
}

.portal-ops-detail__section:has(.portal-ops-tl-scroll) {
  overflow: visible;
}

.portal-ops-tl-track {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 22px 0 40px;
  box-sizing: border-box;
  overflow: visible;
}

.portal-ops-tl-track--commercial {
  min-height: 96px;
}

.portal-ops-tl-rail {
  position: absolute;
  top: 30px;
  left: 11px;
  right: 11px;
  height: 3px;
  background: rgba(255, 210, 120, 0.12);
  border-radius: 2px;
  overflow: hidden;
  z-index: 1;
}

.portal-ops-tl-progress {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c88a28, #ffe08a);
  transition: width 0.5s ease;
}

.portal-ops-tl-node {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max(54px, calc((100% - 48px) / var(--tl-nodes, 6)));
  max-width: 80px;
  text-align: center;
}

.portal-ops-tl-node--first {
  transform: none;
  align-items: flex-start;
  text-align: left;
}

.portal-ops-tl-node--last {
  transform: translateX(-100%);
  align-items: flex-end;
  text-align: right;
}

.portal-ops-tl-node--solo {
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
}

.portal-ops-tl-dot {
  position: relative;
  z-index: 3;
  width: 22px;
  height: 22px;
  margin-top: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 210, 120, 0.35);
  background: #060504;
  box-shadow: 0 0 0 4px #060504;
  color: rgba(255, 228, 170, 0.9);
}

.portal-ops-tl-node--concluido .portal-ops-tl-dot {
  border-color: rgba(120, 210, 150, 0.9);
  background: #060504;
  box-shadow: 0 0 0 4px #060504;
  color: rgba(170, 230, 180, 0.95);
}

.portal-ops-tl-node--em_andamento .portal-ops-tl-dot {
  border-color: rgba(255, 200, 90, 0.95);
  background: #060504;
  box-shadow: 0 0 0 4px #060504;
  animation: portal-ops-tl-pulse 2s ease-in-out infinite;
}

@keyframes portal-ops-tl-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px #060504, 0 0 0 0 rgba(255, 180, 60, 0.35);
  }

  50% {
    box-shadow: 0 0 0 4px #060504, 0 0 0 6px rgba(255, 180, 60, 0);
  }
}

.portal-ops-tl-node--nao_iniciado .portal-ops-tl-dot {
  border-color: rgba(255, 210, 120, 0.22);
  background: #060504;
  box-shadow: 0 0 0 4px #060504;
  color: rgba(255, 228, 170, 0.45);
}

.portal-ops-tl-node--nao_iniciado .portal-ops-tl-info {
  opacity: 0.55;
}

.portal-ops-tl-info {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.portal-ops-tl-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(255, 230, 190, 0.82);
  line-height: 1.2;
  overflow: visible;
  white-space: normal;
}

.portal-ops-tl-name-line {
  display: block;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.portal-ops-tl-name--short {
  display: none;
}

.portal-ops-tl-node--first .portal-ops-tl-name,
.portal-ops-tl-node--first .portal-ops-tl-info {
  align-items: flex-start;
}

.portal-ops-tl-node--last .portal-ops-tl-name,
.portal-ops-tl-node--last .portal-ops-tl-info {
  align-items: flex-end;
}

.portal-ops-tl-node--concluido .portal-ops-tl-name {
  color: rgba(170, 230, 180, 0.88);
}

.portal-ops-tl-node--em_andamento .portal-ops-tl-name {
  color: rgba(255, 228, 170, 0.95);
  font-weight: 600;
}

.portal-ops-tl-sublabel {
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 196, 100, 0.4);
  line-height: 1.2;
}

.portal-ops-history-intro {
  margin: -6px 0 14px;
  font-size: 12px;
  color: rgba(255, 210, 140, 0.42);
  line-height: 1.4;
}

.portal-ops-tl-empty {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 210, 140, 0.45);
}

.portal-ops-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 500;
}

.portal-ops-summary__item {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.portal-ops-summary__item--prod {
  color: rgba(140, 220, 160, 0.88);
}

.portal-ops-summary__item--perda {
  color: rgba(255, 160, 140, 0.88);
}

.portal-ops-summary__item--boas {
  color: rgba(140, 200, 255, 0.88);
}

.portal-ops-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portal-ops-history__item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}

.portal-ops-history__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 28px;
  bottom: -4px;
  width: 1px;
  background: rgba(255, 210, 120, 0.12);
}

.portal-ops-history__dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(255, 200, 90, 0.45);
  justify-self: center;
}

.portal-ops-history__time {
  display: block;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 196, 100, 0.4);
  margin-bottom: 2px;
}

.portal-ops-history__label {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 236, 210, 0.88);
}

.portal-ops-history__detail {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 210, 140, 0.45);
}

.portal-ops-history-empty {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 210, 140, 0.45);
}

.portal-link:not(:disabled) {
  cursor: pointer;
  color: rgba(255, 196, 110, 0.72);
}

.portal-link:not(:disabled):hover {
  color: rgba(255, 228, 170, 0.95);
}

@media (max-width: 900px) {
  .portal-ops-layout {
    grid-template-columns: 1fr;
  }

  .portal-ops-list {
    max-height: none;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .portal-ops-list::-webkit-scrollbar {
    display: none;
  }

  .portal-ops-list__item {
    flex: 0 0 min(78vw, 300px);
    scroll-snap-align: center;
  }

  .portal-ops-tl-name--full {
    display: none !important;
  }

  .portal-ops-tl-name--short {
    display: flex;
  }
}
