/* ─────────────────────────────────────────
   funnels.css — Стили модуля «Воронки и этапы продаж»
───────────────────────────────────────── */

.funnels-config-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.funnel-config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.funnel-config-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
}

/* — Шапка карточки воронки — */
.funnel-config-card .fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--border);
}

.funnel-config-card .fc-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.fc-name {
  font-size: 15px !important;
  font-weight: 600 !important;
  flex: 1 1 0% !important;
  width: 0 !important;        /* сбрасываем width:100% из login.css */
  min-width: 120px !important;
  background: transparent !important;
  border-color: transparent !important;
  padding: 5px 8px !important;
  transition: border-color 0.15s, background 0.15s;
}

.fc-name:hover {
  border-color: var(--border) !important;
  background: rgba(255,255,255,0.04) !important;
}

.fc-name:focus {
  border-color: var(--accent) !important;
  background: rgba(255,255,255,0.05) !important;
  outline: none;
}

.fc-color-input {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2) !important;
  padding: 2px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.fc-id {
  font-size: 10px;
  color: var(--text3);
  font-family: monospace;
  background: rgba(255,255,255,0.04);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* — Этапы — */
.fc-stages-header {
  padding: 12px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.fc-stages-list {
  padding: 0 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-actions {
  padding: 4px 16px 14px;
}

/* — Строка этапа — */
.funnel-stage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.funnel-stage-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
}

/* Ручка перетаскивания */
.fs-drag-handle {
  color: var(--text3);
  cursor: grab;
  font-size: 12px;
  letter-spacing: 2px;
  user-select: none;
  opacity: 0.3;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.funnel-stage-row:hover .fs-drag-handle {
  opacity: 0.9;
  color: var(--accent);
}

.fs-drag-handle:active {
  cursor: grabbing;
}

/* Цветовая точка этапа */
.fs-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2);
  transition: transform 0.15s;
}

.funnel-stage-row:hover .fs-color-dot {
  transform: scale(1.3);
}

/* Поле имени этапа */
.funnel-stage-row .fs-name.form-input {
  flex: 1 1 0% !important;
  width: 0 !important;        /* сбрасываем width:100% из login.css */
  min-width: 80px !important;
  font-size: 13px;
}

/* Пикер цвета этапа */
.fs-color-input {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  padding: 1px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

/* Вероятность */
.fs-prob-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 2px 6px 2px 2px;
}

.fs-prob-wrap .fs-prob {
  width: 42px !important;
  text-align: center;
  padding: 3px 2px !important;
  background: transparent !important;
  border-color: transparent !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.fs-prob-pct {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  line-height: 1;
}

/* Тип этапа (select без form-input, чтобы не тянуть width:100%) */
.fs-type {
  flex-shrink: 0;
  min-width: 90px;
  max-width: 130px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C%2Fpath%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  transition: border-color 0.15s;
}

.fs-type:focus {
  border-color: var(--accent);
}

.fs-type option {
  background-color: var(--bg3, #1e293b);
  color: var(--text);
}

/* Кнопка удаления этапа */
.fs-remove {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.fs-remove:hover {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

/* Ghost при сортировке */
.fs-sortable-ghost {
  opacity: 0.3;
  background: rgba(59,130,246,0.08) !important;
  border-radius: 10px;
}
