/* DZG Yazılım CRM - Kurumsal Stil Dosyası (Mobil & Masaüstü Uyumlu) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --void: #020608;
  --deep: #061014;
  --card: #0a171d;
  --card-hover: #0e1f27;
  --ink: #eaf6f8;
  --soft: #c4d5d9;
  --muted: #8ea5ab;
  --cy: #43d9ff;
  --cy2: #8be9ff;
  --cy-glow: rgba(67, 217, 255, 0.25);
  --green: #6df2a8;
  --green-glow: rgba(109, 242, 168, 0.25);
  --red: #ff5c72;
  --red-glow: rgba(255, 92, 114, 0.25);
  --yellow: #ffd166;
  --rule: rgba(234, 246, 248, 0.10);
  --line: rgba(150, 230, 255, 0.14);
  --line-strong: rgba(150, 230, 255, 0.30);
  --sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 14px;
  --r-sm: 8px;
  --r-lg: 20px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 20px 50px -15px rgba(0, 0, 0, 0.85);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--void);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Arka plan siber ızgara ve ambians */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(800px 500px at 85% -10%, rgba(67, 217, 255, 0.09), transparent 60%),
              radial-gradient(600px 400px at 5% 30%, rgba(109, 242, 168, 0.05), transparent 60%),
              var(--void);
  pointer-events: none;
}

a {
  color: var(--cy);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--cy2);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px; /* Mobilde otomatik zoom'u engellemek için minimum 16px */
  color: inherit;
}

/* ==========================================================================
   ÜST MENÜ / HEADER (MOBİL UYUMLU)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 16, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.header-inner {
  max-width: 1500px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  user-select: none;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.03);
}

.brand-badge {
  background: rgba(67, 217, 255, 0.15);
  color: var(--cy);
  border: 1px solid var(--cy);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
}

/* Sekmeler / Menü (Yatay Kaydırılabilir) */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
  white-space: nowrap;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn .nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-btn .nav-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.nav-btn:hover {
  color: var(--ink);
  background: rgba(150, 230, 255, 0.06);
}

.nav-btn.active {
  color: var(--cy);
  background: rgba(67, 217, 255, 0.12);
  border-color: rgba(67, 217, 255, 0.35);
  font-weight: 700;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-contract-btn {
  border-color: rgba(67, 217, 255, 0.45);
  color: var(--cy);
  background: rgba(67, 217, 255, 0.08);
  font-weight: 700;
  white-space: nowrap;
}

.header-contract-btn:hover {
  background: rgba(67, 217, 255, 0.16);
  border-color: var(--cy);
}

@media (max-width: 640px) {
  .header-contract-btn .btn-text-full { display: none; }
  .header-contract-btn .btn-text-short { display: inline; }
}

@media (min-width: 641px) {
  .header-contract-btn .btn-text-short { display: none; }
}

.user-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--cy);
}

/* ==========================================================================
   ANA İÇERİK KONTEYNERİ & BAŞLIKLAR
   ========================================================================== */
.main-content {
  flex: 1;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.page-desc {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 2px;
}

/* ==========================================================================
   KARTLAR & PANELLER
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--line-strong);
}

/* ==========================================================================
   BUTONLAR (DOKUNMATİK DOSTU)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  min-height: 44px; /* Mobil dokunmatik hedef standardı */
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--cy);
  color: #020608;
  border-color: var(--cy);
  font-weight: 700;
}
.btn-primary:hover, .btn-primary:active {
  background: var(--cy2);
  border-color: var(--cy2);
  box-shadow: 0 0 18px var(--cy-glow);
}

.btn-secondary {
  background: rgba(234, 246, 248, 0.05);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover, .btn-secondary:active {
  background: rgba(234, 246, 248, 0.12);
  border-color: var(--ink);
}

.btn-success {
  background: var(--green);
  color: #020608;
  font-weight: 700;
  border-color: var(--green);
}
.btn-success:hover, .btn-success:active {
  box-shadow: 0 0 18px var(--green-glow);
}

.btn-danger {
  background: rgba(255, 92, 114, 0.15);
  color: var(--red);
  border-color: rgba(255, 92, 114, 0.4);
}
.btn-danger:hover, .btn-danger:active {
  background: var(--red);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 14px 24px;
  min-height: 52px;
  font-size: 16.5px;
}

/* ==========================================================================
   FORMLAR & GİRİŞ ALANLARI
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--soft);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #040b0e;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  min-height: 44px;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cy);
  box-shadow: 0 0 0 2px var(--cy-glow);
}

.mono-num {
  font-family: var(--mono);
  font-weight: 700;
}

/* ==========================================================================
   DURUM ROZETLERİ (BADGES)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-new {
  background: rgba(67, 217, 255, 0.15);
  color: var(--cy);
  border: 1px solid rgba(67, 217, 255, 0.3);
}

.badge-callback {
  background: rgba(255, 209, 102, 0.15);
  color: var(--yellow);
  border: 1px solid rgba(255, 209, 102, 0.3);
}

.badge-interested {
  background: rgba(67, 217, 255, 0.2);
  color: #92e5ff;
  border: 1px solid var(--cy);
}

.badge-sold {
  background: rgba(109, 242, 168, 0.2);
  color: var(--green);
  border: 1px solid var(--green);
}

.badge-danger {
  background: rgba(255, 92, 114, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 92, 114, 0.3);
}

/* ==========================================================================
   MODÜL 1: SERİ ARAMA (POWER DIAL) RESPONSIVE DÜZENİ
   ========================================================================== */
.dial-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
}

.phone-action-card {
  background: #040b0e;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.call-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.call-history-container {
  max-height: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   ARAMA ÖNCESİ İSTİHBARAT, İTİRAZ KARŞILAMA VE SEKTÖR PITCH KARTLARI
   ========================================================================== */
.pre-call-card {
  background: #03080b;
  border: 1px solid rgba(67, 217, 255, 0.2);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 16px;
}

.pre-call-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.quick-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
}
.quick-link-chip.link-web {
  background: rgba(67, 217, 255, 0.08);
  border-color: rgba(67, 217, 255, 0.3);
  color: var(--cy);
}
.quick-link-chip.link-web:hover {
  background: rgba(67, 217, 255, 0.2);
  border-color: var(--cy);
  color: #fff;
}
.quick-link-chip.link-maps {
  background: rgba(109, 242, 168, 0.08);
  border-color: rgba(109, 242, 168, 0.3);
  color: var(--green);
}
.quick-link-chip.link-maps:hover {
  background: rgba(109, 242, 168, 0.2);
  border-color: var(--green);
  color: #fff;
}
.quick-link-chip.link-ig {
  background: rgba(255, 126, 179, 0.08);
  border-color: rgba(255, 126, 179, 0.3);
  color: #ff85be;
}
.quick-link-chip.link-ig:hover {
  background: rgba(255, 126, 179, 0.2);
  border-color: #ff85be;
  color: #fff;
}
.quick-link-chip.link-empty {
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.35);
  color: var(--yellow);
}

.pre-call-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}

.pre-call-meta-item {
  display: flex;
  flex-direction: column;
}
.pre-call-meta-label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}
.pre-call-meta-val {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
}

.pitch-box {
  background: linear-gradient(135deg, rgba(67, 217, 255, 0.06), rgba(0, 0, 0, 0.4));
  border-left: 3px solid var(--cy);
  padding: 12px 14px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 14px;
}
.pitch-title {
  font-size: 12.5px;
  color: var(--cy);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pitch-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

/* İtiraz Karşılama Sekmeleri */
.objections-box {
  background: #040b0e;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
  margin-bottom: 16px;
}
.objection-btn {
  background: rgba(234, 246, 248, 0.04);
  border: 1px solid var(--line);
  color: var(--soft);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: inline-block;
  margin: 3px 3px 3px 0;
}
.objection-btn:hover, .objection-btn.active {
  background: rgba(67, 217, 255, 0.12);
  border-color: var(--cy);
  color: var(--ink);
}
.objection-answer {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--yellow);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: var(--ink);
  margin-top: 8px;
  line-height: 1.45;
  display: none;
}
.objection-answer.show {
  display: block;
}

/* Filtre & Arama Barı */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: var(--deep);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: var(--r);
}
.filter-bar .search-input {
  flex: 1;
  min-width: 220px;
}
.filter-bar select {
  min-width: 160px;
}

/* ==========================================================================
   MODÜL 2: YAPILACAKLAR & GÖREV KARTLARI
   ========================================================================== */
.task-row {
  background: #040b0e;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.task-row.overdue {
  border-color: rgba(255, 92, 114, 0.45);
  background: rgba(255, 92, 114, 0.04);
}

.task-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   MODÜL 3: KANBAN & PROJE İŞ TAKİBİ
   ========================================================================== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 300px);
  gap: 16px;
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

.kanban-column {
  background: #040b0e;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  min-height: 420px;
  scroll-snap-align: start;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
  font-size: 15px;
}

.kanban-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.kanban-card:hover, .kanban-card:active {
  border-color: var(--cy);
  transform: translateY(-2px);
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.checklist-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
  cursor: pointer;
}

/* ==========================================================================
   MODÜL 4: PERFORMANS & İKİLİ GRIDLER
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ==========================================================================
   TABLOLAR & MOBİL KAYDIRMA (RESPONSIVE TABLE)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 650px;
}

.table-responsive th, .table-responsive td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

.table-responsive th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
}

/* ==========================================================================
   MODALLAR (MOBİL BOTTOM SHEET DÖNÜŞÜMÜ)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 8, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  min-width: 36px;
  min-height: 36px;
}

.modal-close:hover {
  color: var(--ink);
}

/* ==========================================================================
   TOAST BİLDİRİMLERİ
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 400px;
  margin-left: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--deep);
  border: 1px solid var(--cy);
  color: var(--ink);
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.error {
  border-color: var(--red);
}

.toast.success {
  border-color: var(--green);
}

.toast-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--cy);
  box-shadow: 0 0 10px var(--cy);
}
.toast.success .toast-indicator, .toast-indicator.toast-success {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.toast.error .toast-indicator, .toast-indicator.toast-error {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   MOBİL & TABLET MEDYA SORGULARI (RESPONSIVE BREAKPOINTS)
   ========================================================================== */

/* Menü etiketleri: masaüstünde ikon + tam ad */
@media (min-width: 993px) {
  .nav-btn { padding: 8px 10px; font-size: 14px; }
}
@media (min-width: 993px) and (max-width: 1320px) {
  .nav-tabs { gap: 2px; }
  .nav-btn { padding: 6px 7px; font-size: 13px; gap: 4px; }
  .brand-badge { display: none; }
}
.nav-btn .nav-short, .nav-btn.nav-more { display: none; }

/* Açılır firma bilgisi bölümü */
.intel-details { margin-top: 16px; padding: 0; }
.intel-details > .intel-summary {
  cursor: pointer;
  list-style: none;
  padding: 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.intel-details > .intel-summary::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--cy);
  border-bottom: 2px solid var(--cy);
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-left: 8px;
}
.intel-details[open] > .intel-summary::after { transform: rotate(-135deg); }
.intel-details > .pre-call-card { margin: 0 16px 16px; }
.more-menu-item { justify-content: flex-start; gap: 12px; min-height: 52px; font-size: 16px; width: 100%; }
.more-menu-item.active { border-color: var(--cy); color: var(--cy); }

/* Tablet & Küçük Ekranlar (<= 992px) */
@media (max-width: 992px) {
  .header-inner {
    padding: 10px 0;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    padding: 6px 0 2px;
    border-top: 1px solid var(--rule);
  }
  .dial-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dial-grid > *, .two-col-grid > * {
    min-width: 0;
  }
  .two-col-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Akıllı Telefonlar (<= 640px) */
@media (max-width: 640px) {
  .main-content {
    padding: 12px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .page-header > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-header > div:last-child .btn {
    flex: 1;
  }

  .phone-action-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .phone-action-card > div:last-child {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .phone-action-card .btn-lg {
    width: 100%;
  }

  /* Çağrı Butonları: Mobilde 2'şerli rahat parmak basış düzeni */
  .call-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .call-actions-grid button:last-child {
    grid-column: span 2;
  }

  /* Görev Kartları: Mobilde dikey yığılma */
  .task-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .task-info {
    align-items: flex-start;
  }
  .task-actions {
    display: flex;
    width: 100%;
    justify-content: flex-end;
  }
  .task-actions .btn {
    flex: 1;
  }

  /* Alt sekme çubuğu (uygulama tarzı): ekranın altına sabit, yana kaymaz */
  .nav-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: repeat(var(--nav-cols, 5), 1fr);
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: rgba(2, 8, 11, 0.97);
    border-top: 1px solid var(--line-strong, var(--line));
    overflow: visible;
    white-space: normal;
    backdrop-filter: blur(12px);
  }
  .nav-btn {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 54px;
    padding: 4px 2px;
    font-size: 11.5px;
    border: none;
    border-radius: 10px;
    white-space: nowrap;
  }
  .nav-btn .nav-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
  .nav-btn .nav-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
  .nav-btn .nav-full { display: none; }
  .nav-btn .nav-short { display: block; }
  .nav-btn.nav-overflow { display: none; }
  .nav-btn.nav-more { display: flex; }
  .nav-btn.active { border: none; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast-container { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }

  /* Başlıktaki blur efekti sabit alt çubuğu başlığa hapsediyordu: telefonda kapalı */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(6, 16, 20, 0.98);
  }

  /* Sayfa başlıkları sade: açıklama gizli, butonlar yan yana */
  .page-header > div:last-child .btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    padding: 10px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page-desc { display: none; }
  .page-title { font-size: 20px; }
  .page-header { gap: 10px; margin-bottom: 12px; }

  /* Seri arama: büyük, kolay dokunulan sonuç düğmeleri */
  .call-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .call-actions-grid .btn {
    min-height: 52px;
    font-size: 14.5px;
    white-space: normal;
    line-height: 1.2;
    padding: 8px 6px;
    min-width: 0;
  }

  /* Tablolar: yatay kaydırma yerine her satır bir kart, alanlar alt alta */
  .table-responsive {
    overflow-x: visible;
  }
  .table-responsive table {
    min-width: 0;
  }
  .table-responsive thead {
    display: none;
  }
  .table-responsive table,
  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive td {
    display: block;
    width: 100%;
  }
  .table-responsive tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 6px 12px;
    margin-bottom: 10px;
  }
  .table-responsive td {
    display: block;
    padding: 8px 0;
    text-align: right !important;
    overflow: hidden;
  }
  .table-responsive td:last-child {
    border-bottom: none;
  }
  .table-responsive td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    float: left;
    margin-right: 12px;
    padding-top: 2px;
  }
  .table-responsive td:first-child {
    display: block;
    text-align: left !important;
    font-size: 16px;
  }
  .table-responsive td:first-child::before {
    display: none;
  }
  .table-responsive td:last-child > div,
  .table-responsive td .form-select {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }

  /* Kanban: yatay kaydırma yerine sütunlar aşağıya doğru akar */
  .kanban-board {
    grid-template-columns: 1fr;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .kanban-column {
    scroll-snap-align: none;
    min-height: 0;
  }

  /* İstatistikler tek sütun / kompakt 2 sütun */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stats-grid .card {
    padding: 14px;
  }
  .stats-grid .mono-num {
    font-size: 26px !important;
  }

  /* Modallar mobilde ekranın altından açılan modern Bottom Sheet şeklini alır */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-content {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    padding: 20px 16px 28px;
    border-bottom: none;
  }

  /* Toast bildirimleri tam ortalı */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Müşteri listesi sayfalama */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
}
.pager .btn { min-height: 44px; flex: 1; max-width: 160px; }
.pager .btn[disabled] { opacity: 0.4; pointer-events: none; }
.pager span { color: var(--soft); font-size: 14px; }

/* ==========================================================================
   PAKETLER & FİYATLAR
   ========================================================================== */
.pkg-wrap { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.pkg-flyer, .pkg-note { grid-column: 1 / -1; }
.pkg-flyer {
  position: relative; cursor: pointer; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); max-height: 220px;
}
.pkg-flyer img { width: 100%; display: block; object-fit: cover; object-position: top; height: 220px; }
.pkg-flyer span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; font-weight: 700; font-size: 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9)); color: var(--ink);
}
.pkg-note { color: var(--soft); font-size: 14px; }
.pkg-note b { color: var(--cy); }
.pkg-cat {
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--pkg);
  border-radius: var(--r); padding: 14px;
}
.pkg-cat-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.pkg-cat-icon { font-size: 26px; line-height: 1; }
.pkg-cat-head h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; }
.pkg-cat-head p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.pkg-item {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 10px;
  min-height: 56px; padding: 10px 12px; margin-top: 8px; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--rule); border-radius: var(--r-sm);
  color: var(--ink); font: inherit; transition: border-color 0.2s, background 0.2s;
}
.pkg-item:hover, .pkg-item:active { border-color: var(--pkg); background: rgba(255, 255, 255, 0.05); }
.pkg-item-name { font-weight: 700; font-size: 15px; }
.pkg-item-price { text-align: right; font-weight: 800; color: var(--pkg); font-size: 14px; white-space: nowrap; }
.pkg-item-price small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.pkg-item-go { color: var(--muted); font-size: 22px; }
.pkg-detail-cat { color: var(--pkg); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.pkg-detail-price { font-size: 28px; font-weight: 800; color: var(--pkg); margin-top: 6px; }
.pkg-detail-unit { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pkg-detail-who { color: var(--soft); font-size: 15px; margin-bottom: 14px; }
.pkg-detail-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.pkg-detail-list { margin: 0 0 14px; padding-left: 20px; color: var(--ink); font-size: 15px; line-height: 1.7; }
.pkg-detail-pitch {
  background: rgba(67, 217, 255, 0.08); border-left: 3px solid var(--pkg); border-radius: 8px;
  padding: 10px 12px; color: var(--soft); font-size: 14px; margin-bottom: 14px;
}
.pkg-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pkg-detail-actions .btn { flex: 1 1 200px; min-height: 48px; }
.modal-content .pkg-wrap { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) {
  .pkg-wrap { grid-template-columns: minmax(0, 1fr); }
  .pkg-item-price { font-size: 13px; }
}

/* ------------------------------------------------------------- */
/* HİZMET SÖZLEŞMESİ OLUŞTURUCU & CANLI ÖNİZLEME */
/* ------------------------------------------------------------- */
.modal-content.modal-contract {
  max-width: 1220px;
  width: 96vw;
  padding: 22px;
}

.contract-builder-grid {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px) {
  .contract-builder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contract-controls-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 78vh;
  overflow-y: auto;
  padding-right: 6px;
}

.contract-sec-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contract-services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contract-service-item {
  display: block;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.contract-service-item:hover {
  border-color: rgba(67, 217, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.contract-service-item.selected {
  border-color: var(--cy);
  background: rgba(67, 217, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(67, 217, 255, 0.3);
}

.contract-service-item-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.contract-service-item-head input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--cy);
  cursor: pointer;
}

.contract-service-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.3;
}

.contract-service-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cy);
  margin-top: 3px;
}

.contract-service-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.contract-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contract-preview-box {
  background: #ffffff;
  color: #1a202c;
  border-radius: var(--r-md);
  padding: 32px 36px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  max-height: 74vh;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.contract-preview-box h1,
.contract-preview-box h2,
.contract-preview-box h3,
.contract-preview-box h4 {
  color: #0f172a;
  margin-top: 0;
}

.contract-preview-box .cp-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.contract-preview-box .cp-company-brand {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.contract-preview-box .cp-company-meta {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
  margin-top: 3px;
}

.contract-preview-box .cp-doc-badge {
  text-align: right;
  font-size: 12px;
  color: #475569;
}

.contract-preview-box .cp-doc-badge strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.contract-preview-box .cp-title {
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0;
  color: #0f172a;
}

.contract-preview-box .cp-sec {
  margin-bottom: 20px;
}

.contract-preview-box .cp-sec-title {
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.contract-preview-box .cp-grid-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 12.5px;
  background: #f8fafc;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.contract-preview-box table.cp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12.5px;
}

.contract-preview-box table.cp-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  text-align: left;
}

.contract-preview-box table.cp-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  color: #1e293b;
}

.contract-preview-box .cp-service-item {
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 0 4px 4px 0;
  font-size: 12.5px;
}

.contract-preview-box .cp-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 18px;
}

.contract-preview-box .cp-sig-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contract-preview-box .cp-sig-stamp {
  height: 55px;
  border-bottom: 1px dotted #94a3b8;
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
}

.contract-banner-callout {
  background: linear-gradient(135deg, rgba(67, 217, 255, 0.12), rgba(109, 242, 168, 0.08));
  border: 1px solid rgba(67, 217, 255, 0.35);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.contract-banner-callout h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px 0;
}

.contract-banner-callout p {
  font-size: 13.5px;
  color: var(--soft);
  margin: 0;
}

/* ------------------------------------------------------------- */
/* CANLI TAKİP & MARKETER İZLEME SİSTEMİ                         */
/* ------------------------------------------------------------- */
.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.live-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(109, 242, 168, 0.8);
  animation: pulse-live-green 2s infinite;
}

.live-dot.idle {
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(255, 180, 0, 0.6);
}

.live-dot.offline {
  background: var(--muted);
  opacity: 0.6;
}

@keyframes pulse-live-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(109, 242, 168, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(109, 242, 168, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(109, 242, 168, 0); }
}

.unsuitable-alert-banner {
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.12), rgba(255, 92, 114, 0.08));
  border: 1px solid rgba(255, 180, 0, 0.35);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  cursor: pointer;
  transition: border-color var(--t);
}

.unsuitable-alert-banner:hover {
  border-color: var(--yellow);
}

.pulse-warning-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 180, 0, 0.8);
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tracker-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: transform var(--t), border-color var(--t);
}

.tracker-card:hover {
  border-color: rgba(67, 217, 255, 0.35);
}

.tracker-user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.tracker-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(67, 217, 255, 0.12);
  border: 1px solid rgba(67, 217, 255, 0.3);
  color: var(--cy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.tracker-current-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13.5px;
}

.tracker-current-box.active {
  background: rgba(67, 217, 255, 0.05);
  border-color: rgba(67, 217, 255, 0.25);
}

.tracker-stats-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tracker-stat-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 8px 6px;
  text-align: center;
}

.tracker-stat-item .num {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.tracker-stat-item .lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 3px;
}

.tracker-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tracker-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.tracker-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cy), var(--green));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.tracker-last-action {
  font-size: 12.5px;
  color: var(--soft);
  border-top: 1px dashed var(--rule);
  padding-top: 10px;
  line-height: 1.4;
}

.unsuitable-lead-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.unsuitable-lead-card:hover {
  border-color: var(--yellow);
}

.skip-history-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin: 10px 0;
}

.skip-history-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.skip-history-item:last-child {
  border-bottom: none;
}

