/* ================================================================
   CUSTOMERS (Müşteriler) — Modern UI  |  BS5 uyumlu
   Sadece görsel. Hiçbir JS/mantık kodu değiştirilmemiştir.
================================================================ */

/* ════════════════════════════════════════════════════════════
   1. SAYFA & ANA KART
════════════════════════════════════════════════════════════ */
body          { background: #F1F5F9 !important; }
.page-wrapper { background: #F1F5F9; }

.loyalty-balance-card {
  padding: 1rem;
  margin-bottom: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
}
.loyalty-balance-card span,
.loyalty-balance-card small {
  display: block;
  color: #64748b;
  font-weight: 700;
}
.loyalty-balance-card strong {
  display: block;
  color: #1e3a8a;
  font-size: 1.7rem;
  font-weight: 900;
}
.loyalty-movement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.loyalty-movement strong,
.loyalty-movement span {
  display: block;
}
.loyalty-movement span {
  color: #94a3b8;
  font-size: 0.78rem;
}
.loyalty-movement b {
  font-size: 1rem;
}
.loyalty-movement b.is-plus { color: #15803d; }
.loyalty-movement b.is-minus { color: #b91c1c; }

.card.block {
  border-radius: 16px !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07) !important;
  border: none !important;
  overflow: hidden;
}

.card.block .card-body { padding: 1.75rem !important; }

.card.block .card-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #1E293B !important;
  margin-bottom: 0.25rem !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card.block .card-title::before {
  content: '';
  flex-shrink: 0;
  display: inline-block;
  width: 4px; height: 18px;
  background: linear-gradient(180deg, #4F46E5, #7C3AED);
  border-radius: 99px;
}
.card.block .card-title span {
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
}
.card.block .card-subtitle {
  font-size: 0.82rem !important;
  color: #94A3B8 !important;
  font-weight: 500 !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   2. FOOTABLE — FİLTRE
════════════════════════════════════════════════════════════ */
.footable-filtering .input-group {
  margin-bottom: 1rem;
}
.footable-filtering .input-group .form-control {
  border-radius: 9px 0 0 9px !important;
  border: 1.5px solid #E2E8F0 !important;
  border-right: none !important;
  font-size: 0.85rem !important;
  padding: 0.5rem 0.9rem !important;
  background: #fff !important;
}
.footable-filtering .input-group .form-control:focus {
  border-color: #4F46E5 !important;
  box-shadow: none !important;
}
.footable-filtering .input-group .btn,
.footable-filtering .input-group-btn .btn {
  border-radius: 0 9px 9px 0 !important;
  border: 1.5px solid #E2E8F0 !important;
  border-left: none !important;
  background: #F8FAFC !important;
  color: #64748B !important;
  padding: 0.5rem 0.85rem !important;
}

/* "Müşteri Ekle" / Add row button */
.footable-add-row.btn,
.btn-footable-add,
[data-add-row] {
  border-radius: 9px !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  padding: 0.45rem 1.1rem !important;
  background: #4F46E5 !important;
  border-color: #4F46E5 !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(79,70,229,0.28) !important;
  transition: all 0.18s;
}
[data-add-row]:hover,
.footable-add-row.btn:hover {
  background: #4338CA !important;
  border-color: #4338CA !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(79,70,229,0.38) !important;
}

/* ════════════════════════════════════════════════════════════
   3. FOOTABLE — TABLO
════════════════════════════════════════════════════════════ */
#footable-addrow { border: none !important; }

#footable-addrow thead th {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748B !important;
  background: #F8FAFC !important;
  border-bottom: 2px solid #E2E8F0 !important;
  border-top: none !important;
  padding: 0.9rem 1rem !important;
  white-space: nowrap;
}

#footable-addrow tbody tr {
  transition: background 0.14s;
}
#footable-addrow tbody tr:hover {
  background: #F5F3FF !important;
}
#footable-addrow tbody td {
  border-bottom: 1px solid #F1F5F9 !important;
  border-top: none !important;
  padding: 0.85rem 1rem !important;
  vertical-align: middle !important;
  font-size: 0.875rem !important;
  color: #374151 !important;
}

/* Müşteri avatarı */
#footable-addrow tbody td img {
  border-radius: 50% !important;
  width: 38px !important; height: 38px !important;
  object-fit: cover !important;
  box-shadow: 0 2px 8px rgba(79,70,229,0.18) !important;
  border: 2px solid #fff !important;
}

/* ════════════════════════════════════════════════════════════
   4. AKSİYON BUTONLARI
════════════════════════════════════════════════════════════ */
#footable-addrow .btn-xs,
#footable-addrow .btn-sm {
  border-radius: 8px !important;
  padding: 0.3rem 0.7rem !important;
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  transition: transform 0.15s, box-shadow 0.15s;
  margin: 0 0.15rem;
}
#footable-addrow .btn-xs:hover,
#footable-addrow .btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Düzenle */
#footable-addrow .btn-info,
#footable-addrow .btn-warning,
#footable-addrow [data-edit-row] {
  background: #EEF2FF !important;
  color: #4F46E5 !important;
  border-color: transparent !important;
}
#footable-addrow .btn-info:hover,
#footable-addrow .btn-warning:hover,
#footable-addrow [data-edit-row]:hover {
  background: #4F46E5 !important;
  color: #fff !important;
}

/* Sil */
#footable-addrow .btn-danger,
#footable-addrow [data-delete-row] {
  background: #FEF2F2 !important;
  color: #EF4444 !important;
  border-color: transparent !important;
}
#footable-addrow .btn-danger:hover,
#footable-addrow [data-delete-row]:hover {
  background: #EF4444 !important;
  color: #fff !important;
}

/* ════════════════════════════════════════════════════════════
   5. SAYFALAMA
════════════════════════════════════════════════════════════ */
.footable-paging .pagination {
  margin-top: 1rem !important;
}
.footable-paging .pagination .page-item .page-link {
  border-radius: 8px !important;
  border: 1.5px solid #E2E8F0 !important;
  color: #4F46E5 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  margin: 0 0.15rem !important;
  transition: all 0.15s;
}
.footable-paging .pagination .page-item.active .page-link {
  background: #4F46E5 !important;
  border-color: #4F46E5 !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(79,70,229,0.3);
}
.footable-paging .pagination .page-item .page-link:hover {
  background: #EEF2FF !important;
  border-color: #4F46E5 !important;
}

/* ════════════════════════════════════════════════════════════
   6. NOT EKLEME / GÖRÜNTÜLEME — Butonlar
════════════════════════════════════════════════════════════ */

/* "Not Ekle" butonu */
.btn-add-note {
  background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 0.35rem 0.85rem !important;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-add-note:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(79,70,229,0.4) !important;
  color: #fff !important;
}
.btn-add-note i { margin-right: 2px; }

/* "Notlar" görüntüleme butonu */
.btn-note-view {
  background: #EEF2FF !important;
  color: #4F46E5 !important;
  border: 1.5px solid #C7D2FE !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 0.3rem 0.75rem !important;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-note-view:hover {
  background: #4F46E5 !important;
  color: #fff !important;
  border-color: #4F46E5 !important;
}
.btn-note-empty {
  opacity: 0.5;
}

.btn-customer-history {
  background: #ECFDF5 !important;
  color: #047857 !important;
  border: 1.5px solid #A7F3D0 !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 0.3rem 0.75rem !important;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-customer-history:hover {
  background: #059669 !important;
  color: #fff !important;
  border-color: #059669 !important;
}
.btn-customer-history i {
  margin-right: 2px;
}

/* ════════════════════════════════════════════════════════════
   7. MÜŞTERİ GEÇMİŞİ MODALI
════════════════════════════════════════════════════════════ */
.ch-modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.ch-modal-header {
  align-items: center;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  border-bottom: 1px solid #E2E8F0;
}
.ch-modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #1E293B;
  font-size: 1rem;
  font-weight: 800;
}
.ch-modal-title-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EEF2FF;
  color: #4F46E5;
}
.ch-modal-customer {
  color: #64748B;
  font-size: 0.85rem;
  font-weight: 600;
}
.ch-modal-footer {
  border-top: 1px solid #F1F5F9;
  background: #F8FAFC;
}
.ch-footer-summary {
  margin-right: auto;
  color: #64748B;
  font-size: 0.82rem;
  font-weight: 700;
}
.ch-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
  color: #64748B;
}
.ch-state-title {
  color: #1E293B;
  font-size: 1rem;
  font-weight: 800;
}
.ch-state-text {
  color: #64748B;
  font-size: 0.88rem;
}
.ch-empty-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  background: #EEF2FF;
  color: #4F46E5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.ch-empty-icon.ch-error-icon {
  background: #FEF2F2;
  color: #EF4444;
}
.ch-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ch-item {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ch-index {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: #4F46E5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}
.ch-content {
  min-width: 0;
}
.ch-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.ch-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #1E293B;
  font-weight: 800;
  font-size: 0.9rem;
}
.ch-date i {
  color: #4F46E5;
}
.ch-price {
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-weight: 800;
  white-space: nowrap;
  font-size: 0.82rem;
}
.ch-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.ch-service-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  font-weight: 700;
  font-size: 0.78rem;
}
.ch-service-muted {
  background: #F8FAFC;
  color: #64748B;
  border-color: #E2E8F0;
}
.ch-appointment-note {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.ch-appointment-note i {
  margin-top: 0.1rem;
  color: #D97706;
}
.ch-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  color: #64748B;
  font-size: 0.82rem;
}
.ch-meta span {
  min-width: 0;
}
.ch-meta i {
  margin-right: 0.35rem;
  color: #94A3B8;
}

@media (max-width: 575.98px) {
  .ch-item {
    grid-template-columns: 1fr;
  }
  .ch-topline {
    flex-direction: column;
    align-items: flex-start;
  }
  .ch-meta {
    grid-template-columns: 1fr;
  }
}
.btn-note-imp {
  border-color: #FCA5A5 !important;
  background: #FEF2F2 !important;
  color: #EF4444 !important;
  animation: pulseImp 2s ease-in-out infinite;
}
@keyframes pulseImp {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 0 4px rgba(239,68,68,0.15); }
}
.note-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #4F46E5;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0 5px;
  margin-left: 4px;
  line-height: 1;
}
.btn-note-imp .note-count-badge {
  background: #EF4444;
}

/* ════════════════════════════════════════════════════════════
   7. NOT EKLEME MODAL
════════════════════════════════════════════════════════════ */
.note-modal-content {
  border-radius: 16px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18) !important;
  overflow: hidden;
}
.note-modal-header {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  border-bottom: none !important;
  padding: 1.2rem 1.5rem;
}
.note-modal-header .modal-title {
  font-weight: 800;
  font-size: 1rem;
}
.note-modal-header .close { color: #fff; opacity: 0.8; text-shadow: none; }
.note-modal-header .close:hover { opacity: 1; }

.note-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.note-input {
  border-radius: 10px !important;
  border: 1.5px solid #E2E8F0 !important;
  font-size: 0.88rem !important;
  padding: 0.6rem 0.9rem !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.note-input:focus {
  border-color: #4F46E5 !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12) !important;
}
select.note-input { cursor: pointer; }

.note-modal-footer {
  border-top: 1px solid #F1F5F9 !important;
  padding: 0.8rem 1.5rem;
}
.note-modal-footer .btn-primary {
  background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.4rem !important;
  transition: all 0.2s;
}
.note-modal-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}
.note-modal-footer .btn-light {
  border-radius: 10px !important;
  font-weight: 600 !important;
}

/* ════════════════════════════════════════════════════════════
   8. NOT LİSTELEME — OFFCANVAS PANEL
════════════════════════════════════════════════════════════ */
.notes-oc {
  position: fixed;
  top: 0; right: -440px;
  width: 420px; max-width: 92vw;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  z-index: 10500;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
}
.notes-oc--open { right: 0; }

.notes-oc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  backdrop-filter: blur(2px);
  z-index: 10499;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.notes-oc--open ~ .notes-oc-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.notes-oc__header {
  padding: 1.3rem 1.5rem;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.notes-oc__title { font-weight: 800; font-size: 1rem; margin: 0; color: #fff; }
.notes-oc__subtitle {
  font-size: 0.78rem;
  opacity: 0.8;
  font-weight: 500;
}
.notes-oc__close {
  background: rgba(255,255,255,0.18);
  border: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.notes-oc__close:hover { background: rgba(255,255,255,0.32); }

.notes-oc__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem 1.5rem;
  background: #F8FAFC;
}

.notes-oc__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #E2E8F0;
  flex-shrink: 0;
  background: #fff;
}
.notes-oc__footer .btn-primary {
  background: linear-gradient(135deg, #4F46E5, #7C3AED) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  width: 100%;
  padding: 0.55rem 0 !important;
}

/* ── Boş Durum ── */
.notes-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #94A3B8;
}
.notes-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.8rem;
  opacity: 0.4;
}
.notes-empty p { font-size: 0.88rem; margin: 0; }

/* ── Tekil Not Kartı ── */
.note-card {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.note-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #C7D2FE;
}
.note-card--imp {
  border-left: 4px solid #EF4444;
  background: #FFFBFB;
}
.note-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.note-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}
.note-imp-badge {
  font-size: 0.62rem;
  font-weight: 800;
  background: #FEE2E2;
  color: #DC2626;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.note-card__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.note-action-btn {
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.note-edit-btn:hover {
  color: #2563EB;
  background: #EFF6FF;
}
.note-del-btn:hover {
  color: #EF4444;
  background: #FEF2F2;
}
.note-card__body {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}
.note-card__date {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  color: #94A3B8;
  font-weight: 500;
}
.note-card__date i { font-size: 0.75rem; margin-right: 2px; vertical-align: middle; }

/* ════════════════════════════════════════════════════════════
   9. RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .card.block .card-body { padding: 1.25rem !important; }

  #footable-addrow thead th,
  #footable-addrow tbody td {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.8rem !important;
  }
  #footable-addrow tbody td img {
    width: 30px !important; height: 30px !important;
  }

  .notes-oc { width: 100vw; max-width: 100vw; right: -100vw; }
  .notes-oc--open { right: 0; }
}
