:root {
  --pv2-bg: #091127;
  --pv2-panel: #101936;
  --pv2-panel-2: #151f42;
  --pv2-card: #1b2549;
  --pv2-card-2: #202b54;
  --pv2-line: rgba(255, 255, 255, 0.08);
  --pv2-line-soft: rgba(255, 255, 255, 0.05);
  --pv2-text: #ffffff;
  --pv2-text-soft: #9da8c7;
  --pv2-text-muted: #7f89a7;
  --pv2-green: #d4ff33;
  --pv2-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.pipeline-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 8px 0 12px;
  box-sizing: border-box;
}

.pipeline-v2 *,
.pipeline-v2 *::before,
.pipeline-v2 *::after {
  box-sizing: border-box;
}

.pipeline-v2__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--pv2-line);
  background:
    radial-gradient(circle at top right, rgba(212, 255, 51, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    #0c1633;
  box-shadow: var(--pv2-shadow);
}

.pipeline-v2__title-block {
  min-width: 0;
  flex: 1;
}

.pipeline-v2__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pv2-green);
}

.pipeline-v2__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--pv2-text);
}

.pipeline-v2__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.pipeline-v2__stat {
  min-width: 122px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
}

.pipeline-v2__stat-label {
  display: block;
  font-size: 10px;
  color: var(--pv2-text-soft);
  margin-bottom: 4px;
}

.pipeline-v2__stat-value {
  display: block;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  color: var(--pv2-text);
}

.pipeline-v2__new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--pv2-green);
  color: #08101b;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(212, 255, 51, 0.18);
  transition: transform .15s ease, box-shadow .15s ease;
}

.pipeline-v2__new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(212, 255, 51, 0.24);
}

.pipeline-v2__filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline-v2__filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-v2__search {
  position: relative;
  width: min(300px, 100%);
  min-width: 220px;
}

.pipeline-v2__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--pv2-text-muted);
  pointer-events: none;
}

.pipeline-v2__search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
  color: var(--pv2-text);
  outline: none;
  font-size: 12px;
  appearance: none;
}

.pipeline-v2__search input::placeholder {
  color: var(--pv2-text-muted);
}

.pipeline-v2__search input:focus {
  border-color: rgba(212,255,51,.32);
  box-shadow: 0 0 0 3px rgba(212,255,51,.08);
}

.pipeline-v2__select-wrap {
  position: relative;
  min-width: 0;
}

.pipeline-v2__select-btn {
  min-width: 144px;
  height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
}

.pipeline-v2__select-btn::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(255,255,255,.72);
  pointer-events: none;
}

.pipeline-v2__select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10,18,40,.98);
  box-shadow: 0 18px 40px rgba(0,0,0,.34);
  max-height: 260px;
  overflow: auto;
}

.pipeline-v2__select-wrap.is-open .pipeline-v2__select-menu {
  display: block;
}

.pipeline-v2__select-option {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  appearance: none;
}

.pipeline-v2__select-option:hover,
.pipeline-v2__select-option.is-active {
  background: rgba(255,255,255,.07);
}

.pipeline-v2__select-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
  border: 1px solid rgba(255,255,255,.18);
}

.pipeline-v2__checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  box-sizing: border-box;
}

.pipeline-v2__checkbox input {
  margin: 0;
  accent-color: var(--pv2-green);
}

.pipeline-v2__clear-btn {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
}

.pipeline-v2__clear-btn:hover {
  background: rgba(255,255,255,0.06);
}

.pipeline-v2__chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-v2__chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--pv2-line-soft);
  background: rgba(255,255,255,0.04);
  color: var(--pv2-text);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  appearance: none;
}

.pipeline-v2__chip.is-active {
  color: var(--pv2-green);
  border-color: rgba(212, 255, 51, 0.46);
  background: rgba(212, 255, 51, 0.08);
}

.pipeline-v2__board-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.pipeline-v2__board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 260px);
  gap: 12px;
  align-items: start;
  width: max-content;
  min-width: 100%;
}

.pipeline-v2__column {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 250px);
  border-radius: 14px;
  border-top: 4px solid var(--stage-accent, var(--pv2-green));
  border-left: 1px solid var(--pv2-line);
  border-right: 1px solid var(--pv2-line);
  border-bottom: 1px solid var(--pv2-line);
  background: linear-gradient(180deg, #121b3d, #101936);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}

.pipeline-v2__column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 10px;
  border-bottom: 1px solid var(--pv2-line);
}

.pipeline-v2__column-title {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--pv2-text);
  letter-spacing: 0.02em;
}

.pipeline-v2__column-meta {
  font-size: 11px;
  color: var(--pv2-text-soft);
  white-space: nowrap;
  font-weight: 700;
}

.pipeline-v2__column-body {
  flex: 1;
  min-height: 360px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(100vh - 292px);
  min-width: 0;
}

.pipeline-v2__column-body.is-over {
  background: rgba(212, 255, 51, 0.03);
  box-shadow: inset 0 0 0 2px rgba(212, 255, 51, 0.16);
}

.pipeline-v2__empty {
  min-height: 170px;
  margin-top: 2px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.pipeline-v2__empty-plus {
  font-size: 32px;
  line-height: 1;
  color: rgba(255,255,255,0.56);
}

.pipeline-v2__empty-text {
  color: #c7d0ea;
  font-size: 13px;
  text-align: center;
  max-width: 180px;
}

.pipeline-v2__card {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, var(--pv2-card), var(--pv2-card-2));
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  min-height: 94px;
}

.pipeline-v2__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.14);
}

.pipeline-v2__card.is-dragging {
  opacity: .62;
  transform: scale(.985);
}

.pipeline-v2__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--tag-color, transparent), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
}

.pipeline-v2__card.is-hot {
  box-shadow: 0 0 0 1px rgba(255, 102, 102, 0.28), 0 14px 28px rgba(0,0,0,0.22);
}

.pipeline-v2__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-v2__card-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pipeline-v2__card-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tag-color, #4b8bff) 88%, white 12%), color-mix(in srgb, var(--tag-color, #4b8bff) 72%, black 28%));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.12);
}

.pipeline-v2__card-texts {
  min-width: 0;
  flex: 1;
}

.pipeline-v2__card-name {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--pv2-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pipeline-v2__card-owner {
  margin-top: 3px;
  font-size: 11px;
  color: var(--pv2-text-soft);
}

.pipeline-v2__card-date {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--pv2-text-soft);
  white-space: nowrap;
  font-weight: 700;
}

.pipeline-v2__card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.pipeline-v2__tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.16);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-v2__tag.is-hot {
  box-shadow: 0 0 0 1px rgba(255, 102, 102, 0.16) inset;
}

.pipeline-v2__card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: .16s ease;
}

.pipeline-v2__card:hover .pipeline-v2__card-actions,
.pipeline-v2__card:focus-within .pipeline-v2__card-actions {
  opacity: 1;
  transform: translateY(0);
}

.pipeline-v2__card-action {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(9,15,30,0.90);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  cursor: pointer;
}

.pipeline-v2__drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 92vw);
  height: 100vh;
  background: linear-gradient(180deg, #0c1633, #091127);
  border-left: 1px solid var(--pv2-line);
  box-shadow: -18px 0 38px rgba(0,0,0,0.22);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
}

.pipeline-v2__drawer.is-open {
  transform: translateX(0);
}

.pipeline-v2__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pv2-line);
}

.pipeline-v2__drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pipeline-v2__drawer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pv2-green);
  color: #0a1220;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
}

.pipeline-v2__drawer-user strong {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}

.pipeline-v2__drawer-user span {
  display: block;
  margin-top: 4px;
  color: var(--pv2-text-soft);
  font-size: 12px;
}

.pipeline-v2__drawer-close {
  border: 0;
  background: rgba(255,255,255,0.06);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

.pipeline-v2__drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.pipeline-v2__drawer-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pv2-text-soft);
  text-align: center;
  font-size: 14px;
}

.pipeline-v2__drawer-compose {
  display: flex;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--pv2-line);
}

.pipeline-v2__drawer-compose textarea {
  flex: 1;
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--pv2-line);
  background: rgba(255,255,255,0.03);
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

.pipeline-v2__drawer-compose button {
  min-width: 90px;
  border: 0;
  border-radius: 12px;
  background: var(--pv2-green);
  color: #08101b;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  appearance: none;
}

.pipeline-v2__toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1300;
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(8,16,32,.96);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .18s ease;
}

.pipeline-v2__toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.pipeline-v2__toast.is-success {
  border-color: rgba(75,214,120,.30);
}

.pipeline-v2__toast.is-error {
  border-color: rgba(255,100,100,.30);
}

.pipeline-v2__toast-title {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 4px;
}

.pipeline-v2__toast-body {
  font-size: 12px;
  color: rgba(255,255,255,.86);
  line-height: 1.45;
}

.pipeline-v2__board-wrap::-webkit-scrollbar,
.pipeline-v2__column-body::-webkit-scrollbar,
.pipeline-v2__drawer-body::-webkit-scrollbar,
.pipeline-v2__select-menu::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pipeline-v2__board-wrap::-webkit-scrollbar-thumb,
.pipeline-v2__column-body::-webkit-scrollbar-thumb,
.pipeline-v2__drawer-body::-webkit-scrollbar-thumb,
.pipeline-v2__select-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}

.pipeline-v2__board-wrap::-webkit-scrollbar-track,
.pipeline-v2__column-body::-webkit-scrollbar-track,
.pipeline-v2__drawer-body::-webkit-scrollbar-track,
.pipeline-v2__select-menu::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .pipeline-v2__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pipeline-v2__header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pipeline-v2__filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .pipeline-v2__search,
  .pipeline-v2__select-wrap,
  .pipeline-v2__checkbox,
  .pipeline-v2__clear-btn {
    width: 100%;
  }

  .pipeline-v2__select-btn,
  .pipeline-v2__checkbox,
  .pipeline-v2__clear-btn {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .pipeline-v2 {
    padding: 6px 0 8px;
  }

  .pipeline-v2__filters-row {
    grid-template-columns: 1fr;
  }

  .pipeline-v2__chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .pipeline-v2__board {
    grid-auto-columns: minmax(240px, 240px);
  }

  .pipeline-v2__column {
    min-height: 500px;
  }

  .pipeline-v2__column-body {
    max-height: none;
    overflow: visible;
  }

  .pipeline-v2__card-actions {
    position: static;
    opacity: 1;
    transform: none;
    margin-top: 10px;
  }

  .pipeline-v2__drawer {
    width: 100%;
  }
}