.view-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}
.view-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
  background: var(--surface-hover);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.view-btn.active .ico { color: var(--accent); }

.chips-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 2px; }
.chip {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  height: 32px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }
.chip-muted { margin-left: auto; color: var(--dim); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-danger { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.dot-warn { background: var(--warn); }
.dot-info { background: var(--info); }
.dot-accent { background: var(--accent); }
.chip-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 999px;
}
.chip.active .chip-count { background: rgba(200, 255, 46, 0.2); color: var(--accent); }

/* KANBAN BOARD */
.board-view {
  display: grid;
  grid-template-columns: repeat(6, minmax(272px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}
.board-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: border-color 0.15s, background 0.15s;
}
.board-col.drag-over { border-color: var(--accent); background: rgba(200, 255, 46, 0.04); }
.col-head {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.col-title { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; }
.col-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 999px;
}
.col-cards { padding: 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.client-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent) var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  cursor: grab;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.client-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.client-card.is-urgent { border-left: 3px solid var(--danger); }
.client-card.is-vip { border-color: rgba(200, 255, 46, 0.28); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-name { font-weight: 700; font-size: 14.5px; color: var(--text); line-height: 1.3; word-break: break-word; }
.card-rate {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(200, 255, 46, 0.2);
  padding: 2px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-vip { background: var(--accent-dim); color: var(--accent); border-color: rgba(200, 255, 46, 0.22); }
.badge-high { background: var(--warn-dim); color: var(--warn); border-color: rgba(255, 178, 36, 0.22); }
.badge-danger { background: var(--danger-dim); color: var(--danger); border-color: rgba(255, 77, 77, 0.25); }
.badge-ok { background: var(--ok-dim); color: var(--ok); border-color: rgba(47, 214, 105, 0.22); }
.badge-info { background: var(--info-dim); color: var(--info); border-color: rgba(77, 184, 255, 0.22); }

.card-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.rev-group { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; }
.mini-actions { display: flex; gap: 4px; align-items: center; }
.mini-btn {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 7px;
  height: 27px;
  padding: 0 7px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.14s ease;
}
.mini-btn .ico { width: 13.5px; height: 13.5px; }
.mini-btn:hover { color: var(--text); border-color: var(--accent-border); background: var(--surface-hover); }

/* TABLE VIEW */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; }
.clients-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.clients-table th, .clients-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.clients-table th {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); background: var(--bg-2); cursor: pointer; user-select: none;
}
.clients-table th:hover { color: var(--accent); }
.clients-table tbody tr { transition: background 0.12s; }
.clients-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.stage-select {
  appearance: none;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}

/* MODAL & TOAST */
.modal {
  border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface);
  color: var(--text); padding: 0; width: min(660px, 94vw);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.78);
}
.modal::backdrop { background: rgba(4, 5, 8, 0.76); backdrop-filter: blur(6px); }
.modal-box { display: flex; flex-direction: column; max-height: 88vh; }
.modal-head, .modal-foot { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-foot { border-bottom: none; border-top: 1px solid var(--line); background: var(--bg-2); }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.modal-foot-right { display: flex; gap: 8px; margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted); font-size: 15px; cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.toast {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--surface-2); border: 1px solid var(--accent-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  color: var(--text); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: all 0.2s ease; z-index: 90;
}
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 640px) { .modal-body { grid-template-columns: 1fr; } }
