﻿/* ============================================================
   TETRALIFT CRM â€” COMPONENTS CSS
   Cards, Tables, Modals, Kanban, Charts, Forms, Tabs
   ============================================================ */

/* â”€â”€â”€ CARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg { color: var(--brand-primary); }

.card-body { padding: 22px; }
.card-body.p-0 { padding: 0; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* â”€â”€â”€ KPI / STAT CARDS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Today's Focus */
.todays-focus-card {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #D85514 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 24px rgba(232,98,26,0.25);
}
.todays-focus-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.todays-focus-sub {
  font-size: 14px;
  opacity: 0.9;
}
.todays-focus-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.todays-focus-item {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  transition: var(--transition);
}
.todays-focus-item:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
.todays-focus-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}
.todays-focus-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-color, var(--brand-primary));
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.kpi-progress {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin-top: 8px;
  overflow: hidden;
}
.kpi-progress-bar {
  height: 100%;
  background: var(--kpi-color, var(--brand-primary));
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

.kpi-card.kpi-blue   { --kpi-color: var(--brand-primary); }
.kpi-card.kpi-green  { --kpi-color: var(--success); }
.kpi-card.kpi-amber  { --kpi-color: var(--warning); }
.kpi-card.kpi-red    { --kpi-color: var(--danger); }
.kpi-card.kpi-purple { --kpi-color: var(--purple); }
.kpi-card.kpi-cyan   { --kpi-color: var(--cyan); }

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--kpi-bg, var(--brand-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kpi-color, var(--brand-primary));
  flex-shrink: 0;
}
.kpi-card.kpi-blue   .kpi-icon { background: var(--brand-primary-light); }
.kpi-card.kpi-green  .kpi-icon { background: var(--success-light); }
.kpi-card.kpi-amber  .kpi-icon { background: var(--warning-light); }
.kpi-card.kpi-red    .kpi-icon { background: var(--danger-light); }
.kpi-card.kpi-purple .kpi-icon { background: var(--purple-light); }
.kpi-card.kpi-cyan   .kpi-icon { background: var(--cyan-light); }

.kpi-change {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.kpi-change.up   { color: var(--success); background: var(--success-light); }
.kpi-change.down { color: var(--danger); background: var(--danger-light); }
.kpi-change.neutral { color: var(--text-secondary); background: var(--bg-app); }

.kpi-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.kpi-footer {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* â”€â”€â”€ DATA TABLE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1;
  max-width: 280px;
  transition: var(--transition);
}
.search-input-wrap:focus-within {
  border-color: var(--border-focus);
  background: var(--bg-white);
}
.search-input-wrap input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}
.search-input-wrap svg { color: var(--text-muted); flex-shrink: 0; }

.table-filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-white);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.table-filter-select:focus { border-color: var(--border-focus); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead tr {
  background: var(--bg-app);
}

.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
[lang="ar"] .data-table th { text-align: right; }
.data-table th:hover { color: var(--text-primary); }
.data-table th.sorted { color: var(--brand-primary); }

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}
[lang="ar"] .data-table td { text-align: right; }

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-app); }
.data-table tbody tr { transition: var(--transition); }

.data-table .td-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.table-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 8px;
}

.pagination {
  display: flex;
  gap: 4px;
}
.page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-white);
  color: var(--text-secondary);
}
.page-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.page-btn.active { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* â”€â”€â”€ MODAL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.2s ease;
  backdrop-filter: blur(3px);
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s cubic-bezier(0.4,0,0.2,1);
}
.modal.modal-lg { max-width: 760px; }
.modal.modal-xl { max-width: 960px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title svg { color: var(--brand-primary); }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
[lang="ar"] .modal-footer { flex-direction: row-reverse; }

/* â”€â”€â”€ TABS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab-btn .tab-count {
  background: var(--bg-app);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  font-size: 11px;
}
.tab-btn.active .tab-count { background: var(--brand-primary-light); color: var(--brand-primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Pills tabs */
.tabs-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-pill {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}
.tab-pill:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.tab-pill.active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* â”€â”€â”€ KANBAN BOARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: calc(100vh - 200px);
  align-items: flex-start;
}

.kanban-column {
  min-width: 270px;
  width: 270px;
  background: var(--bg-app);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  flex-shrink: 0;
}

.kanban-col-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg-white);
  position: sticky;
  top: 0;
}

.kanban-col-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.kanban-col-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.kanban-col-count {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.kanban-col-total {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.kanban-cards {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  cursor: grab;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}
.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
.kanban-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.kanban-card-company {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.kanban-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
}
.kanban-card-service {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-app);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}
.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.kanban-card-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.kanban-card-date {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.kanban-add-btn {
  width: 100%;
  padding: 10px;
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.kanban-add-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* Drag over visual */
.kanban-cards.drag-over {
  background: var(--brand-primary-light);
  border-radius: var(--radius);
}

/* â”€â”€â”€ ACTIVITY FEED â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.activity-content { flex: 1; min-width: 0; }
.activity-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}
.activity-text strong { font-weight: 600; }
.activity-time {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* â”€â”€â”€ CHART CARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chart-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.chart-card-header {
  padding: 18px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.chart-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-wrapper {
  padding: 0 22px 22px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* â”€â”€â”€ DEAL DETAIL / CONTACT DETAIL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.detail-section {
  margin-bottom: 20px;
}
.detail-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-item {}
.detail-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* â”€â”€â”€ TIMELINE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.timeline { position: relative; padding-left: 32px; }
[lang="ar"] .timeline { padding-left: 0; padding-right: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
[lang="ar"] .timeline::before { left: auto; right: 11px; }

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--brand-primary);
}
[lang="ar"] .timeline-item::before { left: auto; right: -25px; }

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* â”€â”€â”€ STAT MINI â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-row-label { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.stat-row-value { font-size: 14px; font-weight: 700; color: var(--text-primary); }

/* â”€â”€â”€ LEAD SCORE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.lead-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  border: 2px solid;
}
.lead-score.hot   { color: var(--danger); border-color: var(--danger); background: var(--danger-light); }
.lead-score.warm  { color: var(--warning); border-color: var(--warning); background: var(--warning-light); }
.lead-score.cold  { color: var(--info); border-color: var(--info); background: var(--info-light); }

/* â”€â”€â”€ SERVICE TAGS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
}
.service-tag.lifting-inspection  { background: #E0F2FE; color: #0369A1; }
.service-tag.tubular-inspection  { background: #F0FDF4; color: #15803D; }
.service-tag.lifting-gear        { background: #FFF7ED; color: #C2410C; }
.service-tag.calibration         { background: #F5F3FF; color: #6D28D9; }
.service-tag.fabrication         { background: #FFF1F2; color: #BE123C; }

/* â”€â”€â”€ CAMPAIGN CARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.campaign-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.campaign-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.campaign-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.campaign-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.campaign-type { font-size: 12px; color: var(--text-muted); }

.campaign-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.campaign-stat-val { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.campaign-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* â”€â”€â”€ TASK ITEM â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-white);
  transition: var(--transition);
  margin-bottom: 8px;
}
.task-item:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.task-item.done { opacity: 0.6; }
.task-item.done .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  margin-top: 2px;
}
.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.task-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.priority-badge.urgent { background: var(--danger-light); color: var(--danger); }
.priority-badge.high   { background: #FFF7ED; color: #EA580C; }
.priority-badge.medium { background: var(--warning-light); color: #B45309; }
.priority-badge.low    { background: var(--success-light); color: var(--success); }

/* â”€â”€â”€ DASHBOARD GRID â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* â”€â”€â”€ SALES FUNNEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px;
}
.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.funnel-bar-wrapper {
  flex: 1;
  height: 28px;
  background: var(--bg-app);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.funnel-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
.funnel-label {
  width: 90px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.funnel-val {
  width: 40px;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
}

/* â”€â”€â”€ LEADERBOARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-rank {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.leaderboard-rank.gold   { background: #FEF9C3; color: #A16207; }
.leaderboard-rank.silver { background: #F1F5F9; color: #475569; }
.leaderboard-rank.bronze { background: #FFF7ED; color: #C2410C; }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.leaderboard-sub  { font-size: 12px; color: var(--text-muted); }
.leaderboard-value { font-size: 15px; font-weight: 800; color: var(--brand-primary); }

/* â”€â”€â”€ RESPONSIVE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-column { width: 100%; min-width: unset; }
  .detail-grid { grid-template-columns: 1fr; }
  .campaign-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* â”€â”€â”€ CHART CARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chart-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.chart-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.chart-wrapper { position: relative; width: 100%; max-width: 100%; min-width: 0; }

/* â”€â”€â”€ GRID UTILITIES â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1024px) { .grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* â”€â”€â”€ DETAIL SECTION â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.detail-section { margin-top: 20px; }
.detail-section-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

/* â”€â”€â”€ UTILITY â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }
.text-2xl { font-size: 22px; }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-primary); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.p-16 { padding: 16px; }
.p-0 { padding: 0 !important; }
.mt-4 { margin-top: 4px; }
.mb-8 { margin-bottom: 8px; }
.fa-in { animation: fadeIn 0.3s ease; }
.fade-in { animation: fadeIn 0.4s ease; }

/* â”€â”€â”€ KANBAN ADD BTN â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-add-btn {
  width: 100%;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}
.kanban-add-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--brand-light); }

/* â”€â”€â”€ KANBAN DRAG-OVER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-cards.drag-over {
  background: var(--brand-light);
  border: 2px dashed var(--brand-primary);
  border-radius: var(--radius);
}

/* â”€â”€â”€ TABLE FILTER SELECT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€*/
.table-filter-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-white);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}
.table-filter-select:focus { border-color: var(--brand-primary); }

/* â”€â”€â”€ AVATAR SIZES â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.avatar-xl { width: 64px; height: 64px; font-size: 22px; }

/* â”€â”€â”€ PROGRESS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.progress {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 99px;
  transition: width 0.5s ease;
}
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.primary { background: var(--brand-primary); }

/* â”€â”€â”€ TD NAME â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.td-name { display: flex; align-items: center; gap: 10px; }

/* â”€â”€â”€ PAGE HEADER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h1 { font-size: 22px; font-weight: 800; color: var(--text-primary); margin: 0 0 4px; }
.page-header-left p { font-size: 13px; color: var(--text-muted); margin: 0; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* â”€â”€â”€ MODAL SIZES â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-xl { max-width: 900px; }

/* â”€â”€â”€ KANBAN COL TOTAL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-col-total { font-size: 11px; color: var(--text-muted); padding: 0 2px 8px; font-weight: 600; }

/* â”€â”€â”€ TAB COUNT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: var(--border);
  color: var(--text-secondary);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}
.tab-btn.active .tab-count { background: rgba(255,255,255,0.3); color: #fff; }

.pb-dashboard { display: flex; flex-direction: column; gap: 24px; padding: 24px; background: #F3F4F6; min-height: calc(100vh - 64px); }
.pb-section { background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.pb-title { font-size: 24px; font-weight: 300; color: #374151; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.pb-dots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; opacity: 0.3; }
.pb-dots span { width: 4px; height: 4px; background: #000; border-radius: 50%; }
.pb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pb-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pb-card { border: 1px solid #F3F4F6; padding: 16px; background: #fff; }
.pb-kpi-value { font-size: 28px; font-weight: 700; color: #F59E0B; text-align: center; margin-top: 8px; }
.pb-kpi-label { text-align: center; font-size: 14px; font-weight: 600; color: #1F2937; background: #FBBF24; padding: 6px 12px; border-radius: 16px; display: inline-block; margin: 0 auto; }
.chart-container-sm { position: relative; height: 150px; width: 100%; }
.pb-subtitle { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 12px; color: #374151; }

/* --- CONTACT STATS CARDS & FAB -------------------------- */
.stat-card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; align-items: center; gap: 16px; cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.stat-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.stat-info { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); }

.fab-mobile { display: none; position: fixed; bottom: 80px; right: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-primary); color: white; border: none; font-size: 24px; box-shadow: 0 4px 12px rgba(234,88,12,0.3); z-index: 1000; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.fab-mobile:active { transform: scale(0.95); }
@media (max-width: 1024px) {
  .fab-mobile { display: flex; }
}

/* --- SIDE PANEL (DRAWER) -------------------------------- */
.side-panel-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 9999; display: flex; justify-content: flex-end; opacity: 0; animation: fadeIn 0.2s forwards; }
.side-panel { width: 400px; max-width: 100%; height: 100%; background: var(--bg-white); box-shadow: -4px 0 16px rgba(0,0,0,0.1); transform: translateX(100%); animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1) forwards; display: flex; flex-direction: column; overflow: hidden; }
.side-panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg-app); }
.side-panel-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.side-panel-close { background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; }
.side-panel-close:hover { color: var(--text-primary); }
.side-panel-body { padding: 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.side-panel-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-app); display: flex; gap: 12px; justify-content: flex-end; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }



/* =======================================================================
   COMPANY OVERHAUL STYLES
   ======================================================================= */
   
/* KPIs Grid (Reuse dashboard grid but limit height) */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* Badges */
.badge-excellent { background: rgba(16,185,129,0.1); color: #047857; }
.badge-warm { background: rgba(245,158,11,0.1); color: #B45309; }
.badge-inactive { background: rgba(239,68,68,0.1); color: #B91C1C; }
.badge-vip { background: linear-gradient(45deg, #F59E0B, #FCD34D); color: #78350F; font-weight: bold; }

/* Company Initials Logo */
.company-logo { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-primary), #E8621A); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; box-shadow: 0 4px 6px rgba(220,53,69,0.2); }

/* Table Hover Quick Actions */
.data-table tbody tr { position: relative; cursor: pointer; }
.row-quick-actions { opacity: 0; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; transition: 0.2s ease; background: var(--bg-card); padding-left: 16px; box-shadow: -10px 0 10px var(--bg-card); }
.data-table tbody tr:hover .row-quick-actions { opacity: 1; }

/* Cards Grid for Mobile */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
.company-card { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-color); padding: 16px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; flex-direction: column; gap: 12px; }
.company-card-header { display: flex; align-items: center; justify-content: space-between; }
.company-card-title { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 12px; }
.company-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; color: var(--text-secondary); background: var(--bg-app); padding: 12px; border-radius: 8px; }
.company-card-stat { display: flex; flex-direction: column; }
.company-card-stat b { color: var(--text-primary); font-size: 14px; margin-top: 4px; }
.company-card-actions { display: flex; gap: 8px; margin-top: 8px; border-top: 1px solid var(--border-color); padding-top: 12px; }

/* 360 Degree View Modal */
.modal-360-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
@media(max-width:768px) { .modal-360-grid { grid-template-columns: 1fr; } }
.modal-360-sidebar { background: var(--bg-app); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.modal-360-main { display: flex; flex-direction: column; gap: 24px; }
.stat-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; text-align: center; }
.stat-box-value { font-size: 24px; font-weight: 700; color: var(--brand-primary); margin-top: 8px; }
.timeline { display: flex; flex-direction: column; gap: 16px; position: relative; padding-left: 20px; border-left: 2px solid var(--border-color); margin-left: 10px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -26px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-primary); border: 2px solid var(--bg-card); }
.ai-insight { background: linear-gradient(to right, rgba(139,92,246,0.1), rgba(139,92,246,0.05)); border-left: 4px solid #8B5CF6; padding: 16px; border-radius: 0 8px 8px 0; display: flex; align-items: flex-start; gap: 12px; }


/* =======================================================================
   DEALS PIPELINE OVERHAUL STYLES
   ======================================================================= */

/* Kanban Mobile Swiping */
@media(max-width:1024px) {
  .kanban-board { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px; }
  .kanban-column { min-width: 85vw; scroll-snap-align: center; }
}

/* Rich Deal Cards */
.kanban-card { position: relative; }
.card-quick-actions { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: 0.2s ease; background: var(--bg-card); padding-left: 8px; }
.kanban-card:hover .card-quick-actions { opacity: 1; }

.deal-prob-bar { height: 6px; background: var(--border-color); border-radius: 4px; overflow: hidden; margin-top: 8px; display: flex; }
.deal-prob-fill { height: 100%; transition: 0.3s ease; }

.priority-high { border-left: 4px solid var(--brand-error); }
.priority-med { border-left: 4px solid var(--brand-warning); }
.priority-low { border-left: 4px solid var(--brand-success); }

/* Deal Side Panel */
.deal-side-panel { position: fixed; top: 0; right: -500px; width: 450px; max-width: 100vw; height: 100vh; background: var(--bg-app); box-shadow: -5px 0 25px rgba(0,0,0,0.1); z-index: 1000; transition: right 0.3s ease; display: flex; flex-direction: column; overflow: hidden; }
.deal-side-panel.open { right: 0; }
.side-panel-header { padding: 20px; background: #fff; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: flex-start; }
.side-panel-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.side-panel-footer { padding: 20px; background: #fff; border-top: 1px solid var(--border-color); display: flex; gap: 12px; }
.panel-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.4); z-index: 999; display: none; opacity: 0; transition: opacity 0.3s ease; }
.panel-backdrop.show { display: block; opacity: 1; }


/* =======================================================================
   REGISTRATIONS PIPELINE STYLES
   ======================================================================= */
@media(max-width:1024px) {
  .table-container #tableBody { display: grid; gap: 16px; grid-template-columns: 1fr; }
  .table-container #tableBody tr { display: flex; flex-direction: column; background: var(--bg-card); border-radius: 12px; padding: 16px; border: 1px solid var(--border-color); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
  .table-container #tableBody td { display: flex; padding: 8px 0; border-bottom: 1px solid #f1f5f9; justify-content: space-between; align-items: center; }
  .table-container #tableBody td:last-child { border-bottom: none; justify-content: flex-end; gap: 8px; }
  .table-container #tableBody td::before { content: attr(data-label); font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
  .table-container thead { display: none; }
}

.reg-progress-bar { height: 6px; background: var(--border-color); border-radius: 4px; overflow: hidden; width: 80px; display: inline-block; margin-right: 8px; vertical-align: middle; }
.reg-progress-fill { height: 100%; transition: 0.3s ease; }
.doc-check { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid var(--border-color); }
.doc-check:last-child { border-bottom: none; }

/* =======================================================================
   TASKS PIPELINE STYLES
   ======================================================================= */
.task-category-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; background: #f1f5f9; font-size: 14px; margin-right: 6px; }

/* My Day Widget */
.my-day-widget { background: #fff; border: 1px solid var(--brand-primary); border-radius: 12px; padding: 16px; margin-bottom: 24px; box-shadow: 0 4px 12px rgba(99,102,241,0.1); }
.my-day-header { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; color: var(--brand-primary); margin-bottom: 12px; }
.my-day-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Task Board (Kanban) */
.task-board { display: flex; gap: 16px; overflow-x: auto; padding: 16px 0; min-height: 400px; align-items: flex-start; }
.task-col { flex: 0 0 320px; background: #f8fafc; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border-color); }
.task-col-header { display: flex; justify-content: space-between; align-items: center; font-weight: 600; padding: 4px 4px 8px; border-bottom: 2px solid var(--border-color); }

/* Task Cards */
.task-card-rich { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.task-card-rich:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.task-card-rich.overdue { border-left: 3px solid var(--brand-error); }
.task-card-rich.done { opacity: 0.6; }
.task-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.task-card-title { font-weight: 600; font-size: 14px; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-muted); }

/* Progress */
.task-progress-wrap { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-top: 4px; }
.task-progress-track { flex: 1; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; }
.task-progress-fill { height: 100%; background: var(--brand-primary); }

@media(max-width: 768px) {
  .task-board { flex-direction: column; }
  .task-col { flex: 1 1 auto; width: 100%; }
}

/* =======================================================================
   SWIPE ACTIONS
   ======================================================================= */
.swipe-container { position: relative; overflow: hidden; border-radius: 8px; margin-bottom: 12px; touch-action: pan-y; }
.swipe-content { position: relative; z-index: 2; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); width: 100%; height: 100%; background: #fff; border-radius: 8px; border: 1px solid var(--border-color); }
.swipe-action { position: absolute; top: 0; bottom: 0; width: 100%; display: flex; align-items: center; color: #fff; font-weight: bold; font-size: 16px; padding: 0 20px; z-index: 1; border-radius: 8px; }
.swipe-action-left { left: 0; justify-content: flex-start; background: var(--brand-success); }
.swipe-action-right { right: 0; justify-content: flex-end; background: var(--brand-error); }

/* =======================================================================
   CALENDAR VIEW
   ======================================================================= */
.calendar-wrapper { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--border-color); overflow: hidden; }
.calendar-day-header { background: #f8fafc; text-align: center; font-size: 12px; font-weight: 600; padding: 8px; color: var(--text-muted); text-transform: uppercase; }
.calendar-day { background: #fff; min-height: 100px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.calendar-day.other-month { background: #fcfcfc; opacity: 0.6; }
.calendar-day.today { background: #eff6ff; }
.calendar-date-label { font-size: 12px; font-weight: 600; text-align: right; margin-bottom: 4px; color: var(--text-muted); }
.calendar-day.today .calendar-date-label { color: var(--brand-primary); }
.cal-event { font-size: 10px; padding: 4px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #fff; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.cal-event.task { background: var(--brand-primary); }
.cal-event.meeting { background: var(--brand-warning); }
.cal-event.task.done { opacity: 0.5; text-decoration: line-through; }

@media(max-width: 768px) {
  .calendar-grid { display: flex; flex-direction: column; border: none; background: transparent; gap: 12px; }
  .calendar-day-header { display: none; }
  .calendar-day { min-height: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; }
  .calendar-day.empty { display: none; }
  .calendar-date-label { text-align: left; font-size: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--border-color); padding-bottom: 4px; }
}
