:root {
  --hcired: #E8192C;
  --hcired2: #C3121F;
  --hciteal: #00A7B5;
  --hciteal2: #008999;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

.sidebar-link {
  transition: all .15s ease;
}
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(232,25,44,0.12), rgba(0,167,181,0.08));
  border-left: 3px solid var(--hcired);
  color: var(--hcired2);
  font-weight: 600;
}
.sidebar-link:hover:not(.active) {
  background: #f3f4f6;
}

.stat-card {
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(0,0,0,0.15);
}

.kanban-col {
  min-width: 260px;
  max-width: 280px;
}

.deal-card {
  cursor: grab;
  transition: box-shadow .15s ease, transform .1s ease;
}
.deal-card:hover {
  box-shadow: 0 6px 14px -4px rgba(0,0,0,0.2);
}
.deal-card.dragging {
  opacity: 0.5;
}
.kanban-col.drag-over {
  background-color: rgba(0,167,181,0.08);
  border-radius: 0.5rem;
}

.badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
}

.status-Lead { background:#fef3c7; color:#92400e; }
.status-Prospect { background:#dbeafe; color:#1e40af; }
.status-Active { background:#d1fae5; color:#065f46; }
.status-Inactive { background:#f3f4f6; color:#6b7280; }

.stage-Lead { background:#fef3c7; color:#92400e; }
.stage-Qualified { background:#e0e7ff; color:#3730a3; }
.stage-Proposal { background:#fde68a; color:#78350f; }
.stage-Negotiation { background:#fed7aa; color:#9a3412; }
.stage-Won { background:#d1fae5; color:#065f46; }
.stage-Lost { background:#fee2e2; color:#991b1b; }

/* Proposal statuses */
.proposal-Draft { background:#f3f4f6; color:#6b7280; }
.proposal-Sent { background:#dbeafe; color:#1e40af; }
.proposal-Viewed { background:#e0e7ff; color:#3730a3; }
.proposal-Accepted { background:#d1fae5; color:#065f46; }
.proposal-Declined { background:#fee2e2; color:#991b1b; }
.proposal-Expired { background:#fef3c7; color:#92400e; }

/* Contract stages */
.contract-Drafting { background:#f3f4f6; color:#6b7280; }
.contract-InternalReview { background:#e0e7ff; color:#3730a3; }
.contract-SentforSignature { background:#fde68a; color:#78350f; }
.contract-Signed { background:#bae6fd; color:#075985; }
.contract-Active { background:#d1fae5; color:#065f46; }
.contract-Completed { background:#dbeafe; color:#1e40af; }
.contract-Terminated { background:#fee2e2; color:#991b1b; }

/* Invoice statuses */
.invoice-Draft { background:#f3f4f6; color:#6b7280; }
.invoice-Sent { background:#dbeafe; color:#1e40af; }
.invoice-PartiallyPaid { background:#fde68a; color:#78350f; }
.invoice-Paid { background:#d1fae5; color:#065f46; }
.invoice-Overdue { background:#fee2e2; color:#991b1b; }
.invoice-Void { background:#e5e7eb; color:#4b5563; }

/* Payment statuses */
.payment-Pending { background:#fef3c7; color:#92400e; }
.payment-Completed { background:#d1fae5; color:#065f46; }
.payment-Failed { background:#fee2e2; color:#991b1b; }
.payment-Refunded { background:#e0e7ff; color:#3730a3; }

.stage-stepper-item {
  flex: 1;
  text-align: center;
  position: relative;
}
.stage-stepper-line {
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}
.stage-stepper-item:first-child .stage-stepper-line { display: none; }
.stage-stepper-dot {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 700;
  background: #e5e7eb;
  color: #9ca3af;
}
.stage-stepper-item.done .stage-stepper-dot { background: var(--hciteal); color: white; }
.stage-stepper-item.done .stage-stepper-line { background: var(--hciteal); }
.stage-stepper-item.current .stage-stepper-dot { background: var(--hcired); color: white; }
.stage-stepper-label { font-size: 10px; color: #6b7280; margin-top: 4px; }
.stage-stepper-item.current .stage-stepper-label { color: var(--hcired2); font-weight: 600; }

.modal-backdrop {
  background: rgba(17,24,39,0.55);
}

.scrollbar-thin::-webkit-scrollbar { height: 8px; width: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }

.btn-primary {
  background: var(--hcired);
  color: white;
}
.btn-primary:hover { background: var(--hcired2); }

.btn-secondary {
  background: var(--hciteal);
  color: white;
}
.btn-secondary:hover { background: var(--hciteal2); }

.fade-in {
  animation: fadeIn .2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast {
  animation: slideIn .25s ease, fadeOut .25s ease 2.5s forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateX(10%); }
}
