/* =============================================
   VEBENDE CRM - Ana Stil Dosyası
   Bootstrap 5 üzerine özel tasarım
   Modüller: Şirketler, Kontaklar, Teklifler, Görevler, Notlar
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Değişkenleri ── */
:root {
  --crm-primary: #4f46e5;      /* Modern Indigo */
  --crm-primary-dk: #4338ca;
  --crm-accent: #0ea5e9;       /* Sky Blue */
  --crm-danger: #f43f5e;       /* Rose */
  --crm-warning: #f59e0b;      /* Amber */
  --crm-success: #10b981;      /* Emerald */
  --crm-info: #06b6d4;         /* Cyan */

  --sidebar-w: 264px;
  --sidebar-bg: #0b0f19;       /* Deep rich dark */
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: var(--crm-primary);
  --sidebar-border: rgba(255, 255, 255, 0.04);

  --body-bg: #f3f5f9;          /* Slightly cooler light gray */
  --card-bg: #ffffff;
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  --card-radius: 18px;         /* Modern rounded corners */

  --text-primary: #1e293b;     /* Slate 800 */
  --text-secondary: #64748b;   /* Slate 500 */
  --text-muted: #94a3b8;       /* Slate 400 */

  --border-color: rgba(0, 0, 0, 0.05);
  --input-bg: #f8fafc;
  --transition: all .25s cubic-bezier(0.25, 0.8, 0.25, 1);
}



/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════
SIDEBAR
══════════════════════════════════════════ */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .3s ease;
  border-right: 1px solid var(--sidebar-border);
}

#sidebar .sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}

#sidebar .logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--crm-primary), var(--crm-accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

#sidebar .logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

#sidebar .logo-text #sidebar-company-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  letter-spacing: normal;
}

#sidebar .logo-text span:last-child {
  display: block;
  font-size: 0.63rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.nav-section-label {
  padding: 16px 20px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fb923c;
  /* Canlı Portakal Rengi */
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: 0.9;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 4px 12px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  transition: transform 0.2s;
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: rgba(255, 255, 255, 0.95);
}

.sidebar-link:hover i {
  transform: scale(1.1);
}

.sidebar-link.active {
  background: var(--sidebar-active);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ── Sidebar Quick Action Dropdown ── */
.sidebar-select-btn {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  transition: all 0.2s;
  text-align: left;
}

.sidebar-select-btn:hover,
.sidebar-select-btn:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-dropdown-menu {
  background-color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 8px;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1100;
}

.sidebar-dropdown-menu .dropdown-header {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 10px 12px 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.sidebar-dropdown-menu .dropdown-item {
  color: #334155;
  font-size: 0.76rem;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  white-space: normal;
  line-height: 1.3;
}

.sidebar-dropdown-menu .dropdown-item i {
  font-size: 0.95rem;
  width: 24px;
  color: var(--crm-primary);
  opacity: 0.8;
}

.sidebar-dropdown-menu .dropdown-item:hover {
  background-color: #f8fafc;
  color: var(--crm-primary);
  transform: translateX(3px);
}

.dropdown-item {
  font-size: 0.82rem;
  padding: 6px 16px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item i {
  font-size: 0.95rem;
  width: 18px;
  opacity: 0.8;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--crm-primary);
}

.dropdown-item.text-danger:hover {
  background-color: #fff1f2;
  color: var(--crm-danger);
}

.sidebar-dropdown-menu .dropdown-divider {
  border-color: #f1f5f9;
  margin: 10px 0;
}

.sidebar-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-dropdown-menu::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.sidebar-link .badge-count {
  margin-left: auto;
  background: #ffffff;
  color: var(--crm-primary);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sidebar-link:not(.active) .badge-count {
  background: rgba(255,255,255,0.1);
  color: #fff;
  box-shadow: none;
}

.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--crm-primary), var(--crm-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ══════════════════════════════════════════
MAIN CONTENT
══════════════════════════════════════════ */
#main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s ease;
}

@media (min-width: 992px) {
  body.sidebar-collapsed #sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-collapsed #main-content {
    margin-left: 0;
  }
}

/* ── TOPBAR ── */
#topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

#topbar .page-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
}

#topbar .search-wrap {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
  margin-right: 8px;
}

.search-icon-wrap {
  position: relative;
}

.search-icon-wrap .bi-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 5;
}

#topbar .search-wrap .form-control {
  border-radius: 24px;
  background: var(--input-bg);
  border-color: var(--border-color);
  font-size: 0.85rem;
  padding-left: 40px;
  padding-right: 45px;
  /* Added padding for clear button */
}

.search-clear-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 40px;
  background: var(--crm-danger);
  color: #fff !important;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-clear-btn:hover {
  background: #e11d48;
  opacity: 0.95;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

/* Dijital Saat Stili */
.digital-clock-wrap {
  background: transparent; /* Zemin kaldırıldı */
  padding: 0 10px;
  border: none; /* Kenarlık kaldırıldı */
  box-shadow: none; /* Gölge kaldırıldı */
  display: flex;
  align-items: center;
  justify-content: center;
}

#digital-clock {
  color: #334155; /* Antrasit */
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transform: scaleX(0.8);
  transform-origin: right center;
  line-height: 1;
}

#digital-clock .clock-date {
  font-size: 0.85rem; /* Daha okunabilir boyut */
  font-weight: 600;
  color: #64748b;     /* Profesyonel Slate tonu (okunabilirlik için en iyisi) */
  opacity: 1;         /* Transparanlık kaldırıldı */
  margin-right: 8px;
  letter-spacing: 0.01em;
}

#digital-clock .clock-time {
  color: #166534; /* Koyu Yeşil */
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace; /* Dijital hissiyatlı font */
  font-size: 1.8rem; /* Oldukça büyük */
  font-weight: 900;
  display: inline-block;
  transform: scaleY(1.4) scaleX(0.9); /* Boyunu uzatır, genişliği daraltır */
  transform-origin: center;
  line-height: 1;
}

.notif-btn:hover {
  background: var(--crm-primary);
  color: #fff;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crm-danger);
  border: 2px solid var(--card-bg);
}

.btn-add-main {
  background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dk));
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(91, 94, 244, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-add-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91, 94, 244, 0.45);
  color: #fff;
}

/* ── PAGE ── */
.page-content {
  padding: 26px;
  flex: 1;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
  animation: fadeUp .28s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════
STAT CARDS
══════════════════════════════════════════ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 155px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.sc-primary::before { background: var(--crm-primary); }
.stat-card.sc-success::before { background: var(--crm-success); }
.stat-card.sc-warning::before { background: var(--crm-warning); }
.stat-card.sc-danger::before { background: var(--crm-danger); }
.stat-card.sc-info::before { background: var(--crm-info); }

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  transition: var(--transition);
}

.stat-card:hover .stat-icon {
  transform: scale(1.08) rotate(-5deg);
}

.stat-card.sc-primary .stat-icon {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(79, 70, 229, 0.05));
  color: var(--crm-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.stat-card.sc-success .stat-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  color: var(--crm-success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.stat-card.sc-warning .stat-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  color: var(--crm-warning);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.stat-card.sc-danger .stat-icon {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(244, 63, 94, 0.05));
  color: var(--crm-danger);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
}

.stat-card.sc-info .stat-icon {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
  color: var(--crm-info);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

.stat-value {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.stat-change.up {
  background: rgba(16, 185, 129, 0.1);
  color: var(--crm-success);
}

.stat-change.down {
  background: rgba(244, 63, 94, 0.1);
  color: var(--crm-danger);
}

/* ── Custom Premium Tooltip ── */
.tooltip-inner {
  background: #1a1d2e !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  max-width: 280px !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #1a1d2e !important;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #1a1d2e !important;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: #1a1d2e !important;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: #1a1d2e !important;
}

/* ══════════════════════════════════════════
DATA CARD / TABLE
══════════════════════════════════════════ */
.data-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header-crm {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header-crm h6 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-header-crm .header-actions {
  margin-left: auto;
}

.crm-table {
  margin: 0;
}

.crm-table thead th {
  background: #f8f9fc;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  white-space: nowrap;
}

.crm-table tbody td {
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text-primary);
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  transition: all .2s ease;
}

.crm-table tbody tr {
  transition: all 0.2s ease;
}

.crm-table tbody tr:last-child td {
  border-bottom: none;
}

.crm-table tbody tr:hover td {
  background: rgba(79, 70, 229, 0.02);
}

/* ── AVATAR ── */
.crm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--crm-primary), var(--crm-accent));
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   BADGE â€” STATUS
══════════════════════════════════════════ */
.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending {
  background-color: #ffc107 !important; /* Canlı Amber/Sarı */
  color: #000 !important;               /* Siyah Yazı */
  font-weight: 800 !important;         /* Kalın Yazı */
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Company / Contact */
.badge-active {
  background: rgba(52, 195, 143, 0.12);
  color: #1a7a57;
}

.badge-inactive {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

.badge-prospect {
  background: rgba(80, 195, 247, 0.15);
  color: #0369a1;
}

.badge-partner {
  background: rgba(217, 70, 239, 0.12);
  color: #a21caf;
}

.badge-target {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

/* Company size */
.badge-enterprise {
  background: rgba(111, 66, 193, 0.12);
  color: #6923c0;
}

.badge-sme {
  background: rgba(13, 110, 253, 0.12);
  color: #1d4ed8;
}

.badge-startup {
  background: rgba(0, 201, 167, 0.12);
  color: #035c4c;
}

/* Quote status */
.badge-draft {
  background: rgba(107, 114, 128, 0.1);
  color: #4b5563;
}

.badge-sent {
  background: rgba(13, 110, 253, 0.1);
  color: #1d4ed8;
}

.badge-negotiation {
  background: rgba(253, 126, 20, 0.12);
  color: #b45309;
}

.badge-approved {
  background: rgba(52, 195, 143, 0.12);
  color: #1a7a57;
}

.badge-rejected {
  background: rgba(245, 92, 122, 0.12);
  color: #9f1239;
}

/* Task */
.badge-pending {
  background: rgba(255, 181, 71, 0.12);
  color: #856404;
}

.badge-in_progress {
  background: rgba(80, 195, 247, 0.15);
  color: #0369a1;
}

.badge-completed {
  background: rgba(52, 195, 143, 0.12);
  color: #1a7a57;
}

/* Priority */
.badge-high {
  background: rgba(245, 92, 122, 0.12);
  color: #9f1239;
}

.badge-medium {
  background: rgba(255, 181, 71, 0.12);
  color: #856404;
}

.badge-low {
  background: rgba(52, 195, 143, 0.12);
  color: #1a7a57;
}

/* ── Inline Task Status Select ── */
.task-inline-select {
  border: none !important;
  cursor: pointer !important;
  padding-right: 22px !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 7px center !important;
  background-size: 9px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  outline: none !important;
  font-weight: 700 !important;
  transition: var(--transition) !important;
}

.task-inline-select:hover {
  filter: brightness(0.95);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.task-inline-select option {
  background-color: #fff;
  color: #1a1d2e;
  font-weight: 500;
}

/* ══════════════════════════════════════════
   QUOTE PIPELINE KANBAN
══════════════════════════════════════════ */
.pipeline-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  height: 100%;
  padding-bottom: 12px;
}

.pipeline-board::-webkit-scrollbar {
  height: 5px;
}

.pipeline-board::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.pipeline-col {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  flex: 1;
  min-width: 280px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pipeline-col-header {
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stage-count {
  margin-left: auto;
  background: var(--input-bg);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.pipeline-cards-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.pipeline-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.pipeline-card:hover {
  border-color: var(--crm-primary);
  box-shadow: 0 4px 14px rgba(91, 94, 244, 0.2);
  transform: translateY(-1px);
}

.pipeline-card .deal-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.3;
}

.pipeline-card .deal-company {
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pipeline-card .deal-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--crm-primary);
}

.pipeline-card .deal-no {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   QUOTE DETAIL
══════════════════════════════════════════ */
.quote-items-table thead th {
  background: #f8f9fc;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.quote-items-table tbody td {
  padding: 10px 14px;
  font-size: 0.855rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.quote-items-table tbody tr:last-child td {
  border-bottom: none;
}

.quote-totals-box {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
}

.quote-totals-box .total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.855rem;
  padding: 5px 0;
}

.quote-totals-box .total-line.grand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--crm-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 5px;
}

/* Quote item row in modal */
.item-row {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px 70px 70px 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.item-row input,
.item-row select {
  font-size: 0.82rem;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
}

.item-row input:focus,
.item-row select:focus {
  border-color: var(--crm-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 94, 244, 0.12);
}

.item-row-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ══════════════════════════════════════════
   TASK / NOTE
══════════════════════════════════════════ */
.task-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left-width: 5px;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-color: var(--crm-primary);
}

.task-status-border-pending {
  border-left-color: var(--crm-warning) !important;
}

.task-status-border-in_progress {
  border-left-color: var(--crm-primary) !important;
}

.task-status-border-completed {
  border-left-color: var(--crm-success) !important;
}

.task-item.completed {
  opacity: 0.8;
}

.task-check-area {
  padding-top: 2px;
}

.task-check-area input[type=checkbox] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  accent-color: var(--crm-primary);
}

.task-item .task-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.task-item .task-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.task-source-link {
  font-size: 0.78rem;
  color: var(--crm-primary);
  background: rgba(91, 94, 244, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid rgba(91, 94, 244, 0.15);
}

.task-source-link:hover {
  background: rgba(91, 94, 244, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.task-source-link i {
  color: var(--crm-accent);
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.note-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.note-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.note-card .note-type {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.note-card.note-relation {
  border-top: 4px solid #000;
}

.note-card.note-sales {
  border-top: 4px solid var(--crm-primary);
}

.note-card.note-meeting {
  border-top: 4px solid var(--crm-success);
}

.note-card.note-technical {
  border-top: 4px solid var(--crm-warning);
}

.note-card.note-general {
  border-top: 4px solid #cbd5e1;
}

.note-card.note-referral {
  border-top: 4px solid #7c3aed;
}

.note-card.note-complaint {
  border-top: 4px solid #dc2626;
}

.note-card.note-advice {
  border-top: 4px solid #0891b2;
}

.note-type-sales {
  color: var(--crm-primary);
}

.note-type-meeting {
  color: var(--crm-success);
}

.note-type-technical {
  color: var(--crm-warning);
}

.note-type-general {
  color: var(--text-secondary);
}

.note-type-relation {
  color: #000 !important;
  font-weight: 800 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-type-relation::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #000;
  border-radius: 50%;
}

.note-type-referral {
  color: #7c3aed;
}

.note-type-complaint {
  color: #dc2626;
}

.note-type-advice {
  color: #0891b2;
}

.note-card .note-content {
  font-size: 0.855rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ── Kontak Durum Belirteçleri (Timeline Stili) ── */
.status-timeline-line {
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #e2e8f0;
}

.status-indicator-dot {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.status-indicator-dot .dot-inner {
  width: 7px;
  height: 7px;
  background-color: #cbd5e1;
  border-radius: 50%;
}

.status-dot-active {
  border-color: var(--crm-success) !important;
  color: var(--crm-success);
}

.status-dot-active .dot-inner {
  background-color: var(--crm-success);
}

.status-dot-inactive {
  border-color: var(--crm-danger) !important;
  color: var(--crm-danger);
}

.status-dot-inactive .dot-inner {
  background-color: var(--crm-danger);
}

.status-dot-prospect {
  border-color: var(--crm-warning) !important;
  color: var(--crm-warning);
}

.status-dot-prospect .dot-inner {
  background-color: var(--crm-warning);
}

.note-card .note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════
   CHART
══════════════════════════════════════════ */
.chart-wrap {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  padding: 20px;
}

.chart-wrap h6 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.mini-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--crm-primary), var(--crm-primary-dk));
  min-height: 4px;
}

.bar-label {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  color: var(--text-secondary);
}

.legend-value {
  font-weight: 700;
  color: var(--text-primary);
  margin-left: auto;
  padding-left: 12px;
}

/* ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═  
   MODAL / FORM / BUTTONS
═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═ ═  */
.modal-content {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 20px 25px;
}

.modal-header .modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-body {
  padding: 22px 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 14px 24px;
}

.form-label {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: 10px;
  font-size: 0.875rem;
  padding: 9px 14px;
  background: var(--input-bg);
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 3px rgba(91, 94, 244, 0.15);
  background: #fff;
}

textarea.form-control {
  resize: vertical;
}

.btn-crm-primary {
  background: linear-gradient(135deg, var(--crm-primary), var(--crm-primary-dk));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 20px;
  box-shadow: 0 4px 14px rgba(91, 94, 244, 0.35);
  transition: var(--transition);
}

.btn-crm-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91, 94, 244, 0.45);
  color: #fff;
}

.btn-crm-outline {
  background: transparent;
  color: var(--crm-primary);
  border: 1.5px solid var(--crm-primary);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 18px;
  transition: var(--transition);
}

.btn-crm-outline:hover {
  background: var(--crm-primary);
  color: #fff;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--crm-primary);
  color: #fff;
  border-color: var(--crm-primary);
}

.btn-icon.danger:hover {
  background: var(--crm-danger);
  border-color: var(--crm-danger);
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-bar .form-select,
.filter-bar .form-control {
  max-width: 180px;
  font-size: 0.82rem;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 2.8rem;
  opacity: .25;
  margin-bottom: 10px;
  display: block;
}

.empty-state p {
  font-size: 0.88rem;
  margin: 0;
}

/* ── TOAST ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crm-toast {
  background: var(--text-primary);
  color: #fff;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 0.84rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .28s ease;
  min-width: 220px;
}

.crm-toast.success i {
  color: var(--crm-success);
}

.crm-toast.error i {
  color: var(--crm-danger);
}

.crm-toast.info i {
  color: var(--crm-info);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* ── SIDEBAR OVERLAY ── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1039;
}

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #sidebar-overlay.show {
    display: block;
  }

  #main-content {
    margin-left: 0;
  }

  .page-content {
    padding: 14px;
  }

  .item-row {
    grid-template-columns: 1fr 60px 80px 80px 60px 60px 30px;
    gap: 5px;
  }
}

/* ══════════════════════════════════════════
   AKTİVİTE MODÜLÜ
══════════════════════════════════════════ */

/* Aktivite tipi ikonları + renkler */
.act-type-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.act-phone_out {
  background: rgba(91, 94, 244, 0.12);
  color: var(--crm-primary);
}

.act-phone_in {
  background: rgba(52, 195, 143, 0.12);
  color: var(--crm-success);
}

.act-zoom {
  background: rgba(80, 195, 247, 0.15);
  color: #0369a1;
}

.act-visit {
  background: rgba(255, 181, 71, 0.12);
  color: #b45309;
}

.act-other {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
}

/* Aktivite liste kartı */
.activity-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left-width: 5px;
  /* Durum rengi için kalın sol border */
  border-radius: var(--card-radius);
  padding: 18px 20px 33px 20px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.act-timeline-item.planned .activity-card {
  border-left-color: #10b981;
}

.act-timeline-item.cancelled .activity-card {
  border-left-color: #ef4444;
}

.act-timeline-item.first_contact .activity-card {
  border-left-color: #000000;
}

.act-timeline-item.completed .activity-card {
  border-left-color: #0ea5e9;
}

.linked-task-card:hover {
  background-color: #f8fafc !important;
  border-color: var(--crm-primary) !important;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.activity-card:hover {
  border-color: var(--crm-primary);
  border-left-width: 5px;
  /* Hover durumunda da kalınlık korunmalı */
  box-shadow: 0 4px 18px rgba(91, 94, 244, 0.15);
  transform: translateY(-1px);
}

.activity-card .act-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Talepler SaÄŸ Alt KöÅŸe (Absolute) */
.act-req-list-absolute {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 15px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border-top-left-radius: 12px;
  border-bottom-right-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  border-right: none;
  border-bottom: none;
}

.req-side-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e65100;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  width: fit-content;
}

.activity-card .act-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.activity-card .act-meta i {
  color: var(--crm-primary);
}

/* Durum rozeti */
.badge-planned {
  background: rgba(80, 195, 247, 0.12);
  color: #0369a1;
}

.badge-completed {
  background: rgba(52, 195, 143, 0.12);
  color: #1a7a57;
}

.badge-cancelled {
  background: rgba(245, 92, 122, 0.12);
  color: #9f1239;
}

/* Aktivite detay paneli (modal içi) */
.act-detail-section {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.act-detail-section h6 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

/* Kararlar listesi */
.decision-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.decision-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.855rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.decision-item input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--crm-primary);
  cursor: pointer;
}

.decision-item.done span {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Eklenti & Dosya Stilleri */
.attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.attachment-badge:hover {
  border-color: var(--crm-primary);
  background: rgba(91, 94, 244, 0.05);
  color: var(--crm-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91, 94, 244, 0.12);
}

.attachment-badge i {
  font-size: 1.1rem;
  color: var(--crm-primary);
}

.attachment-item {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  transition: .2s;
}

.attachment-item:hover {
  border-color: var(--crm-primary);
  background: #f1f5f9;
}

.attachment-item i {
  font-size: 1.1rem;
  color: var(--crm-primary);
}

/* Karar ekleme satırı */
.decision-add-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.decision-add-row input {
  flex: 1;
  font-size: 0.84rem;
  padding: 7px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
}

.decision-add-row input:focus {
  border-color: var(--crm-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 94, 244, 0.12);
}

/* Sonraki aktivite kutusu */
.next-act-box {
  background: linear-gradient(135deg, rgba(91, 94, 244, 0.07), rgba(0, 201, 167, 0.06));
  border: 1px solid rgba(91, 94, 244, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
}

.next-act-box .next-act-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--crm-primary);
  margin-bottom: 4px;
}

.next-act-box .next-act-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.next-act-box .next-act-date {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Katılımcı pilleri */
.participant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.participant-pill {
  background: rgba(91, 94, 244, 0.1);
  color: var(--crm-primary);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.76rem;
  font-weight: 600;
}

/* Önceki aktivite mini linki */
.prev-act-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 12px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.prev-act-link:hover {
  border-color: var(--crm-primary);
  color: var(--crm-primary);
  background: rgba(91, 94, 244, 0.06);
}

/* Zaman çizelgesi (aktivite takvim) */
.act-timeline {
  position: relative;
  padding-left: 28px;
}

.act-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  border-radius: 1px;
}

.act-timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.act-timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crm-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--crm-primary);
}

.act-timeline-item.planned::before {
  background: var(--crm-info);
  box-shadow: 0 0 0 2px var(--crm-info);
}

.act-timeline-item.cancelled::before {
  background: var(--crm-danger);
  box-shadow: 0 0 0 2px var(--crm-danger);
}

/* Form â€” aktivite kalemleri */
.act-form-section {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 4px;
}

.act-form-section label.section-title {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 10px;
}

/* ══════════════════════════════════════════
   ŞİRKET KONTAK SPLIT-PANEL MODAL
══════════════════════════════════════════ */
.ccm-body {
  display: flex;
  min-height: 520px;
  max-height: 75vh;
  overflow: hidden;
}

/* Sol panel â€” kontak listesi */
.ccm-left {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  background: #fafbff;
}

.ccm-left-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ccm-contact-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.ccm-contact-item:last-child {
  border-bottom: none;
}

.ccm-contact-item:hover {
  background: rgba(91, 94, 244, 0.05);
}

.ccm-contact-item.active {
  background: rgba(91, 94, 244, 0.1);
  border-left: 3px solid var(--crm-primary);
}

.ccm-contact-item .ccm-name {
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.ccm-contact-item .ccm-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* SaÄŸ panel â€” detay */
.ccm-right {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  background: var(--body-bg);
}

/* Detay üst bilgi bloÄŸu */
.ccm-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.ccm-detail-hero .ccm-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ccm-detail-hero .ccm-full-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.ccm-detail-hero .ccm-title-dept {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Info grid */
.ccm-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.ccm-info-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
}

.ccm-info-item .ccm-info-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.ccm-info-item .ccm-info-val {
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ccm-info-item .ccm-info-val a {
  color: var(--crm-primary);
  text-decoration: none;
}

/* Bölüm baÅŸlıkları */
.ccm-section-title {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.ccm-section-title i {
  color: var(--crm-primary);
}

/* Mini aktivite satırı */
.ccm-act-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  transition: var(--transition);
}

.ccm-act-item:hover {
  border-color: var(--crm-primary);
  box-shadow: 0 2px 10px rgba(91, 94, 244, 0.12);
}

.ccm-act-item .ccm-act-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.ccm-act-item .ccm-act-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.ccm-act-item .ccm-act-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mini teklif satırı */
.ccm-quote-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ccm-quote-item .ccm-quote-no {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--crm-primary);
  white-space: nowrap;
}

.ccm-quote-item .ccm-quote-title {
  font-size: 0.82rem;
  color: var(--text-primary);
  flex: 1;
}

.ccm-quote-item .ccm-quote-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--crm-primary);
  white-space: nowrap;
}

/* Empty sol panel */
.ccm-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.ccm-empty i {
  font-size: 2.2rem;
  opacity: .2;
  display: block;
  margin-bottom: 8px;
}

.ccm-empty p {
  font-size: .83rem;
  margin: 0;
}

/* Sidebar Quick Add */
.side-quick-add {
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fd7e14;
  /* Portakal Rengi */
  color: #fff !important;
  opacity: 0.8;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(253, 126, 20, 0.3);
}

.sidebar-link:hover .side-quick-add {
  opacity: 1;
}

.side-quick-add:hover {
  background: #e86b00;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 4px 10px rgba(253, 126, 20, 0.5);
}

/* ══════════════════════════════════════════
   CALENDAR (İŞ PLANI)
══════════════════════════════════════════ */
.calendar-container {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.calendar-header-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--crm-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  padding: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 120px;
}

.cal-day {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 8px;
  position: relative;
  transition: .2s;
  background: #fff;
  min-width: 0;
}

.cal-day:nth-child(7n) {
  border-right: none;
}

.cal-day.other-month {
  background: #f8f9fa;
  color: #ccc;
}

.cal-day.today {
  background: rgba(var(--crm-primary-rgb), 0.04);
}

.cal-day.today .day-number {
  background: var(--crm-primary);
  color: #fff;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.today-flash {
  animation: flash-today 3s ease-out;
}

@keyframes flash-today {
  0% {
    background-color: rgba(91, 94, 244, 0.4);
  }

  100% {
    background-color: transparent;
  }
}

/* ── Calendar Highlights ── */
.cal-day.weekend {
  background: #f1f5f9; /* Hafta sonu hafif kurşuni */
}

.cal-day.today {
  background: #ecfdf5 !important; /* Bugün yeşilimsi belirgin */
  border: 1px solid #10b981;
  z-index: 2;
}

.cal-week-day.weekend {
  background: #f1f5f9 !important;
}

.cal-week-day.is-today {
  background: #ecfdf5 !important;
  border-left: 2px solid #10b981;
  border-right: 2px solid #10b981;
  z-index: 2;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 90px;
  overflow-y: auto;
  padding-right: 2px;
}

.cal-events::-webkit-scrollbar {
  width: 4px;
}

.cal-events::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.day-count-badge {
  background: var(--crm-primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  min-width: 17px;
  text-align: center;
  line-height: 1.2;
}

.cal-event {
  font-size: 0.68rem;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 0.1s;
}

.cal-event:hover {
  transform: translateX(2px);
  filter: brightness(0.95);
}

.clock-date {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 5px;
}

.clock-time {
  font-family: monospace;
  color: var(--crm-primary);
}

.cal-event.type-phone_out {
  background: #e0f2fe;
  color: #0369a1;
  border-left: 3px solid #0ea5e9;
}

.cal-event.type-visit {
  background: #fef2f2;
  color: #9f1239;
  border-left: 3px solid #f43f5e;
}

.cal-event.type-zoom {
  background: #f0f9ff;
  color: #075985;
  border-left: 3px solid #3b82f6;
}

.cal-event.type-meeting {
  background: #f0fdf4;
  color: #166534;
  border-left: 3px solid #22c55e;
}

.cal-event.type-other {
  background: #f5f3ff;
  color: #5b21b6;
  border-left: 3px solid #8b5cf6;
}

.cal-event.type-task {
  background: #fff7ed;
  color: #c2410c;
  border-left: 3px solid #f97316;
}

/* ── Modern iOS-Style Toggle Switch ── */
.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.toggle-item:hover {
  border-color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), 0.03);
}

.toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.crm-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.crm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.crm-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
}

.crm-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.crm-switch input:checked+.crm-slider {
  background-color: var(--crm-primary);
}

.crm-switch input:checked+.crm-slider:before {
  transform: translateX(18px);
}

.toggle-item.active {
  border-color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), 0.05);
}

.toggle-item.active .toggle-label {
  color: var(--crm-primary);
}

/* Flash animation for quick selection */
@keyframes highlight-flash {
  0% {
    background-color: rgba(91, 94, 244, 0.2);
  }

  100% {
    background-color: var(--input-bg);
  }
}

.highlight-flash {
  animation: highlight-flash 1s ease-out;
}

.btn-icon-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: .2s;
}

.btn-icon-round:hover {
  background: var(--crm-primary);
  color: #fff;
  border-color: var(--crm-primary);
}

/* ══════════════════════════════════════════
   MÜŞTERİ GEÇMİŞİ MODALI (CHM)
   ══════════════════════════════════════════ */
.chm-section {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chm-section .section-header {
  padding: 14px 18px;
  background: #fdfdfd;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.chm-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.chm-list::-webkit-scrollbar {
  width: 4px;
}

.chm-list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.chm-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.chm-item:hover {
  border-color: var(--crm-primary);
  box-shadow: 0 4px 12px rgba(91, 94, 244, 0.08);
  transform: translateY(-1px);
}

.chm-item-title {
  font-weight: 700;
  font-size: .84rem;
  margin-bottom: 4px;
  color: var(--text-primary);
  line-height: 1.4;
}

.chm-item-meta {
  font-size: .72rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chm-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chm-item-notes {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

/* ══════════════════════════════════════════
   EXPENSES MODULE
   ══════════════════════════════════════════ */
.expense-summary-card {
  padding: 20px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--card-radius);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.expense-summary-card:hover {
  border-color: rgba(91, 94, 244, 0.2);
  background: #f8fafc;
  transform: translateY(-4px);
}

.expense-summary-card.active {
  border-color: var(--crm-primary);
  background: rgba(91, 94, 244, 0.03);
  box-shadow: 0 10px 25px rgba(91, 94, 244, 0.12);
}

.expense-summary-card .month-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.expense-summary-card .month-total {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--crm-primary);
  line-height: 1.2;
}

.expense-summary-card .item-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.expense-summary-card.active .month-label {
  color: var(--crm-primary);
}

/* ══════════════════════════════════════════
   CRM MODERN TOGGLE SWITCH (iOS Style)
   ══════════════════════════════════════════ */
.filter-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.filter-toggle-item:hover {
  border-color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), 0.03);
}

.filter-toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.crm-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.crm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.crm-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
}

.crm-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.crm-slider {
  background-color: var(--crm-primary);
}

input:checked+.crm-slider:before {
  transform: translateX(18px);
}

.filter-toggle-item.active {
  border-color: var(--crm-primary);
  background: rgba(var(--crm-primary-rgb), 0.05);
}

.filter-toggle-item.active .filter-toggle-label {
  color: var(--crm-primary);
}

/* -- Quick Add Button Style -- */
.btn-plus-quick {
  background: #fff !important;
  border: 1px solid #dee2e6 !important;
  color: var(--crm-primary) !important;
  transition: var(--transition) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  min-width: 38px;
  min-height: 38px;
}

.btn-plus-quick:hover {
  background: var(--crm-primary) !important;
  border-color: var(--crm-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(91, 94, 244, 0.25);
}

/* ── QUOTE MANAGEMENT BOTTOM TABS ── */
#quote-view-tabs {
  background: #f8f9fc;
}

#quote-view-tabs .nav-link {
  color: var(--text-secondary);
  border: none;
  background: transparent;
  transition: var(--transition);
  position: relative;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

#quote-view-tabs .nav-link:hover {
  color: var(--crm-primary);
  background: rgba(91, 94, 244, 0.04);
}

#quote-view-tabs .nav-link.active {
  color: var(--crm-primary) !important;
  background: #fff !important;
  box-shadow: none !important;
}

#quote-view-tabs .nav-link.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--crm-primary);
}

}

/* ── Mesaj Highlight Animasyonu ── */
@keyframes highlightFade {
  0% {
    background-color: rgba(251, 146, 60, 0.4) !important;
    box-shadow: 0 0 20px rgba(251, 146, 60, 0.5) !important;
    transform: scale(1.01);
  }

  20% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.chat-bubble-highlight {
  animation: highlightFade 3s ease-out forwards;
}

.chat-bubble-unread {
  background-color: #fff4e6 !important;
  /* Daha belirgin portakal tonu */
  border: 1.5px solid #fb923c !important;
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.15) !important;
}

.message-item.active {
  background-color: rgba(91, 94, 244, 0.08) !important;
  border-left: 6px solid var(--crm-primary) !important;
  box-shadow: inset 5px 0 15px rgba(91, 94, 244, 0.05);
  position: relative;
  z-index: 2;
}

.message-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: rgba(91, 94, 244, 0.1);
}

.message-item:hover:not(.active) {
  background: #f8fafc;
}

/* ── Modern Vertical Timeline ── */
.timeline-container {
  padding: 10px 5px 10px 0;
  position: relative;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.timeline-container::-webkit-scrollbar {
  width: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.timeline-item {
  position: relative;
  padding-left: 35px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  background: #f8fafc;
  transform: translateX(2px);
  border-color: var(--crm-primary);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: -24px;
  width: 2px;
  background: #eef2f7;
  z-index: 1;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  background: #fff;
  border: 2px solid var(--crm-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 0.75rem;
  color: var(--crm-primary);
  box-shadow: 0 0 0 4px #fff;
}

.timeline-item.active .timeline-icon {
  background: var(--crm-primary);
  color: #fff;
}

.timeline-date {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.timeline-content {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.timeline-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}

.timeline-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── LOCK BUTTON (Attention Seeker) ── */
.lock-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
  position: relative;
  z-index: 10;
  animation: lock-glow-pulse 2s infinite;
}

@keyframes lock-glow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

.lock-btn:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.lock-btn i {
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ── Mükemmel Dark Mode Teması (Overrides) ── */
[data-theme="dark"] {
  /* Ultra Premium Carbon Palette */
  --body-bg: #121417;          /* Carbon Black Background */
  --card-bg: #1c2128;          /* Sleek Card Surface */
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --text-primary: #ffffff;     /* Pure White Text */
  --text-secondary: #9ca3af;   /* Balanced Grey */
  --text-muted: #94a3b8;       /* Lighter Muted Slate for Contrast */
  --border-color: rgba(255, 255, 255, 0.04);
  --input-bg: #22272e;
  --crm-primary: #ff4d00;      /* Vibrant Orange Accent */
  --crm-primary-dk: #e64500;
  --crm-accent: #f59e0b;
}

/* Glassmorphism & Surface Refinements for Dark Mode */
[data-theme="dark"] .data-card, 
[data-theme="dark"] .stat-card,
[data-theme="dark"] .modal-content {
  background: rgba(28, 33, 40, 0.95) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: var(--card-shadow) !important;
  border-radius: 1.25rem !important;
}

[data-theme="dark"] .card-header-crm {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] #sidebar {
  background: #0d1117 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .sidebar-nav-link:hover,
[data-theme="dark"] .sidebar-nav-link.active {
  background: rgba(255, 77, 0, 0.1) !important;
  color: var(--crm-primary) !important;
}

[data-theme="dark"] .sidebar-nav-link i {
  color: #4b5563;
}

[data-theme="dark"] .sidebar-nav-link.active i {
  color: var(--crm-primary) !important;
}

[data-theme="dark"] .btn-primary {
  background-color: var(--crm-primary) !important;
  border-color: var(--crm-primary) !important;
  box-shadow: 0 4px 15px rgba(255, 77, 0, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
  background-color: var(--crm-primary-dk) !important;
  box-shadow: 0 6px 20px rgba(255, 77, 0, 0.4);
}

/* Status Badge Dark Mode Overrides */
[data-theme="dark"] .badge-active {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important; /* Emerald-400 */
}
[data-theme="dark"] .badge-inactive {
  background: rgba(156, 163, 175, 0.15) !important;
  color: #d1d5db !important;
}
[data-theme="dark"] .badge-prospect {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}
[data-theme="dark"] .badge-partner {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #a78bfa !important;
}
[data-theme="dark"] .badge-target {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
}

[data-theme="dark"] .pin-input-field {
  background-color: #1a1e26 !important;
  border: 1px solid var(--crm-primary) !important;
  color: var(--crm-primary) !important;
  box-shadow: 0 0 10px rgba(255, 77, 0, 0.1) !important;
}

[data-theme="dark"] .pin-input-field::placeholder {
  color: var(--crm-primary) !important;
  opacity: 0.8 !important;
}

[data-theme="dark"] .pin-input-field:focus {
  background-color: #242931 !important;
  border-color: var(--crm-primary) !important;
  box-shadow: 0 0 15px rgba(255, 77, 0, 0.3) !important;
}

/* Genel Sınıf Geçişleri */
[data-theme="dark"] body { background-color: var(--body-bg); color: var(--text-primary); }
[data-theme="dark"] .bg-light { background-color: rgba(255,255,255,0.03) !important; color: var(--text-primary) !important; }
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .text-dark { color: #ffffff !important; }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .text-primary { color: var(--crm-primary) !important; }

/* Scrollbar (Kaydırma Çubuğu) */
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--body-bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Formlar ve Inputlar */
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { 
  background-color: #2d333b !important; 
  border: 1px solid rgba(255, 255, 255, 0.15) !important; 
  color: #ffffff !important; 
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2) !important;
}
[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus { 
  background-color: #353c45 !important; 
  color: #ffffff !important; 
  border-color: var(--crm-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 77, 0, 0.2) !important;
}
[data-theme="dark"] .form-control::placeholder {
  color: var(--crm-primary) !important;
  opacity: 0.7 !important;
}
[data-theme="dark"] .form-label {
  color: #9ca3af !important;
  font-weight: 500 !important;
  margin-bottom: 0.4rem !important;
}
[data-theme="dark"] .input-group-text {
  background-color: #242931 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #9ca3af !important;
}

/* Tablolar */
[data-theme="dark"] .table { color: var(--text-primary); border-color: var(--border-color); --bs-table-color: var(--text-primary); --bs-table-bg: transparent; }
[data-theme="dark"] .table tbody tr { border-bottom: 1px solid var(--border-color); transition: background-color 0.2s; }
[data-theme="dark"] .table tbody tr:hover { background-color: rgba(255,255,255,0.02); }
[data-theme="dark"] .table thead th, [data-theme="dark"] .crm-table thead th { background-color: rgba(255,255,255,0.02) !important; border-bottom-color: rgba(255,255,255,0.08) !important; color: var(--text-secondary) !important; }

/* Modallar */
[data-theme="dark"] .modal-content { background-color: var(--card-bg); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); }
[data-theme="dark"] .modal-header { border-bottom-color: var(--border-color); }
[data-theme="dark"] .modal-footer { border-top-color: var(--border-color); background-color: rgba(0,0,0,0.1); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* Dropdown Menüler ve Sidebar Hızlı Ekle (Fix) */
[data-theme="dark"] .dropdown-menu, [data-theme="dark"] .sidebar-dropdown-menu { background-color: #1e293b; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
[data-theme="dark"] .sidebar-dropdown-menu .dropdown-header { color: var(--crm-accent); }
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .sidebar-dropdown-menu .dropdown-item { color: var(--text-primary) !important; }
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .sidebar-dropdown-menu .dropdown-item:hover { background-color: var(--crm-primary) !important; color: #ffffff !important; transform: translateX(3px); }
[data-theme="dark"] .sidebar-dropdown-menu .dropdown-item i { color: var(--text-secondary); }
[data-theme="dark"] .sidebar-dropdown-menu .dropdown-item:hover i { color: #ffffff; }
[data-theme="dark"] .dropdown-divider { border-color: var(--border-color); }

/* Kartlar ve İstatistikler */
[data-theme="dark"] .stat-card { background-color: var(--card-bg); border-color: rgba(255,255,255,0.03); }
[data-theme="dark"] .stat-card:hover { border-color: rgba(255,255,255,0.1); }

/* Çizgi Çerçeveler */
[data-theme="dark"] .border { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-bottom { border-bottom-color: var(--border-color) !important; }
[data-theme="dark"] .border-top { border-top-color: var(--border-color) !important; }
[data-theme="dark"] .border-end { border-end-color: var(--border-color) !important; }
[data-theme="dark"] .border-start { border-start-color: var(--border-color) !important; }

/* Sekmeler (Tabs) */
[data-theme="dark"] .nav-tabs { border-bottom-color: var(--border-color); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--text-secondary); }
[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: transparent; color: var(--text-primary); }
[data-theme="dark"] .nav-tabs .nav-link.active { background-color: var(--card-bg); color: var(--crm-primary); border-color: var(--border-color) var(--border-color) var(--card-bg); }

/* Tooltip Karanlık Mod İyileştirmesi (Turuncu Üzerine Siyah) */
[data-theme="dark"] .tooltip-inner {
  background-color: var(--crm-primary) !important;
  color: #000000 !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 25px rgba(255, 77, 0, 0.3) !important;
}
[data-theme="dark"] .tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: var(--crm-primary) !important; }
[data-theme="dark"] .tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: var(--crm-primary) !important; }
[data-theme="dark"] .tooltip.bs-tooltip-start .tooltip-arrow::before { border-left-color: var(--crm-primary) !important; }
[data-theme="dark"] .tooltip.bs-tooltip-end .tooltip-arrow::before { border-right-color: var(--crm-primary) !important; }

/* Saat ve Tarih Karanlık Mod Görünürlük */
[data-theme="dark"] #digital-clock .clock-time {
  color: var(--crm-primary) !important;
  text-shadow: 0 0 10px rgba(255, 77, 0, 0.2);
}
[data-theme="dark"] #digital-clock .clock-date {
  color: var(--text-secondary) !important;
  opacity: 0.8 !important;
}

/* Command Palette (Cmd+K) */
[data-theme="dark"] #cmdk-modal { background: #161d2d !important; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 25px 50px rgba(0,0,0,0.6); }
[data-theme="dark"] #cmdk-input { color: #ffffff !important; background: transparent; }
[data-theme="dark"] #cmdk-input::placeholder { color: var(--text-muted); }

.cmdk-item {
  position: relative;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.cmdk-item i {
  font-size: 1.1rem;
  color: #64748b;
  margin-right: 16px;
}

.cmdk-item .cmdk-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
}

.cmdk-item .cmdk-badge {
  font-size: 0.65rem;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: auto;
  font-weight: 600;
}

/* Selected State - Orange Theme */
.cmdk-item.selected {
  background-color: #fff7ed !important; 
  border-left-color: #f97316;
}

.cmdk-item.selected i {
  color: #f97316;
}

.cmdk-item.selected .cmdk-title {
  color: #c2410c;
}

[data-theme="dark"] .cmdk-item .cmdk-title { color: var(--text-primary); }
[data-theme="dark"] .cmdk-item .cmdk-badge { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

[data-theme="dark"] .cmdk-item.selected {
  background-color: rgba(249, 115, 22, 0.15) !important;
  border-left-color: #fb923c;
}

[data-theme="dark"] .cmdk-item.selected .cmdk-title {
  color: #fb923c;
}

[data-theme="dark"] #cmdk-results > div[style*="background: #f8fafc"] { background: rgba(255,255,255,0.03) !important; border-top: 1px solid var(--border-color); }

/* Topbar */
[data-theme="dark"] #topbar { background: var(--card-bg); border-bottom-color: var(--border-color); }
[data-theme="dark"] .search-icon-wrap .bi-search { color: var(--text-muted); }
[data-theme="dark"] #topbar .page-title { color: #ffffff; }

/* Chart ve SVG fix */
[data-theme="dark"] .donut-legend .legend-label { color: var(--text-secondary); }
[data-theme="dark"] .donut-legend .legend-value { color: var(--text-primary); }

/* ════ SKELETON LOADING (SHIMMER) ════ */
.skeleton {
  background: linear-gradient(90deg, var(--card-bg) 25%, var(--body-bg) 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  display: block;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 8px; width: 100%; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; width: 100%; margin-bottom: 20px; }
.skeleton-row { height: 50px; width: 100%; margin-bottom: 8px; }
/* -- Premium Messaging Toggle -- */
.premium-msg-toggle {
  background: #f1f5f9;
  border-radius: 50px;
  padding: 4px;
  display: flex;
  position: relative;
  width: 180px;
  height: 38px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.premium-msg-toggle .toggle-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  z-index: 2;
  transition: color 0.3s ease;
}

.premium-msg-toggle .toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.premium-msg-toggle.archived .toggle-slider {
  transform: translateX(100%);
}

.premium-msg-toggle.archived .toggle-item:first-child {
  color: #64748b;
}

.premium-msg-toggle.archived .toggle-item:last-child {
  color: var(--crm-primary);
}

.premium-msg-toggle:not(.archived) .toggle-item:first-child {
  color: var(--crm-primary);
}

/* Dark Mode Support */
[data-theme="dark"] .premium-msg-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .premium-msg-toggle .toggle-slider {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .premium-msg-toggle .toggle-item {
  color: #94a3b8;
}
