:root {
  --sidebar-bg: #1a2236;
  --sidebar-hover: #243047;
  --sidebar-active: #2d3e58;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f1f5f9; }

#sidebar {
  width: 240px; min-height: 100vh; background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
  transition: width 0.3s ease; overflow-y: auto; overflow-x: hidden;
}
#sidebar.collapsed { width: 64px; }
.sidebar-logo {
  padding: 18px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid #2d3e58; flex-shrink: 0;
}
.logo-icon { width: 36px; height: 36px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; color: white; }
.logo-text { color: white; font-weight: 700; font-size: 16px; white-space: nowrap; }
.logo-sub { color: #94a3b8; font-size: 11px; }
#sidebar.collapsed .logo-text, #sidebar.collapsed .logo-sub,
#sidebar.collapsed .menu-label, #sidebar.collapsed .menu-arrow,
#sidebar.collapsed .submenu { display: none; }
nav { flex: 1; padding: 10px 0; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px;
  cursor: pointer; color: #94a3b8; transition: all 0.2s;
  border-radius: 6px; margin: 2px 8px; user-select: none;
}
.menu-item:hover { background: var(--sidebar-hover); color: white; }
.menu-item.active { background: var(--sidebar-active); color: white; }
.menu-item .icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.menu-label { font-size: 13.5px; font-weight: 500; flex: 1; white-space: nowrap; }
.menu-arrow { font-size: 10px; transition: transform 0.2s; }
.menu-arrow.open { transform: rotate(90deg); }
.submenu { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.submenu.open { max-height: 300px; }
.submenu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 50px; cursor: pointer;
  color: #94a3b8; font-size: 13px; transition: all 0.2s;
  border-radius: 6px; margin: 1px 8px;
}
.submenu-item:hover { background: var(--sidebar-hover); color: white; }
.submenu-item.active { color: var(--accent-light); background: rgba(59,130,246,0.1); }
.sub-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.sidebar-bottom { padding: 12px; border-top: 1px solid #2d3e58; flex-shrink: 0; }
.user-box {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  cursor: pointer; border-radius: 8px; transition: background 0.2s;
}
.user-box:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 34px; height: 34px; background: var(--accent); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.user-name { color: white; font-size: 13px; font-weight: 600; }
.user-role { color: #94a3b8; font-size: 11px; }
#sidebar.collapsed .menu-item { justify-content: center; }

#main { margin-left: 240px; transition: margin-left 0.3s ease; }
#sidebar.collapsed ~ #main { margin-left: 64px; }

.topbar {
  background: white; height: 60px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.toggle-btn {
  width: 36px; height: 36px; border: none; background: transparent;
  cursor: pointer; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; color: #64748b; transition: background 0.2s;
}
.toggle-btn:hover { background: #f1f5f9; }
.page-title { font-size: 17px; font-weight: 700; color: #1e293b; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 36px; height: 36px; border: none; background: #f8fafc;
  cursor: pointer; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: #64748b; transition: all 0.2s; position: relative;
}
.topbar-btn:hover { background: #e2e8f0; }
.badge { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%; border: 2px solid white; }
.topbar-date { font-size: 13px; color: #64748b; }

.page-content { padding: 24px; }
.section { display: none; }
.section.active { display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: white; border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-val { font-size: 22px; font-weight: 800; color: #1e293b; }
.stat-lbl { font-size: 12px; color: #64748b; margin-top: 2px; }
.stat-change { font-size: 12px; margin-top: 4px; font-weight: 600; }
.up { color: #22c55e; } .down { color: #ef4444; }

.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card { background: white; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.chart-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 16px; }

.table-card { background: white; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden; margin-bottom: 20px; }
.table-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1f5f9; }
.table-header h3 { font-size: 14px; font-weight: 700; color: #1e293b; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th { background: #f8fafc; padding: 11px 16px; text-align: left;
  font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.tbl tbody tr { border-bottom: 1px solid #f8fafc; transition: background 0.15s; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr:last-child { border-bottom: none; }
.tbl td { padding: 12px 16px; font-size: 13.5px; color: #374151; }
.tbl .amount { font-weight: 700; }
.tbl .green { color: #16a34a; } .tbl .red { color: #dc2626; }
.tbl .orange { color: #ea580c; }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.pill-green { background: #dcfce7; color: #16a34a; }
.pill-blue { background: #dbeafe; color: #2563eb; }
.pill-yellow { background: #fef9c3; color: #ca8a04; }
.pill-red { background: #fee2e2; color: #dc2626; }
.pill-orange { background: #fff7ed; color: #ea580c; }
.pill-gray { background: #f1f5f9; color: #64748b; }
.pill-purple { background: #f3e8ff; color: #9333ea; }

.btn { display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 8px; font-size: 13px;
  font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-outline { background: white; color: #374151; border: 1.5px solid #e2e8f0; }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; border-radius: 6px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 16px; padding: 28px; width: 100%;
  max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-lg { max-width: 720px; }
.modal-title { font-size: 17px; font-weight: 800; color: #1e293b; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer;
  color: #94a3b8; transition: color 0.2s; line-height: 1; }
.modal-close:hover { color: #1e293b; }
.form-group { margin-bottom: 15px; }
.form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }
.form-control {
  width: 100%; padding: 10px 13px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13.5px; color: #1e293b; outline: none; transition: border-color 0.2s; background: white;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px;
  padding-top: 16px; border-top: 1px solid #f1f5f9; }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px;
  background: white; border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 9px 14px; min-width: 240px; }
.search-box input { border: none; outline: none; font-size: 13.5px; color: #1e293b; background: transparent; width: 100%; }
.search-box i { color: #94a3b8; }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.quick-card { background: white; border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: all 0.2s; flex: 1; min-width: 150px; }
.quick-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.q-icon { width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px; }
.q-label { font-size: 13px; font-weight: 600; color: #374151; }
.q-sub { font-size: 11px; color: #94a3b8; }

.section-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.section-hdr h2 { font-size: 18px; font-weight: 800; color: #1e293b; }
.section-hdr p { font-size: 13px; color: #64748b; }

.info-banner { background: linear-gradient(135deg, #1a2236, #2d3e58);
  color: white; border-radius: 14px; padding: 20px 24px;
  margin-bottom: 24px; display: flex; align-items: center; gap: 16px; }
.ib-icon { font-size: 28px; }
.ib-title { font-size: 16px; font-weight: 700; }
.ib-sub { font-size: 12px; opacity: 0.75; margin-top: 2px; }

.kasa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kasa-card { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.kc-name { font-size: 13px; color: #64748b; font-weight: 500; }
.kc-amount { font-size: 24px; font-weight: 800; color: #1e293b; margin: 6px 0; }
.kc-iban { font-size: 11px; color: #94a3b8; }
.kc-bar { height: 4px; background: #f1f5f9; border-radius: 2px; margin-top: 12px; }
.kc-fill { height: 100%; border-radius: 2px; }

/* ===== ÖDEME YAP MODAL ===== */
.odeme-bilgi-box {
  background: #f8fafc; border-radius: 10px; padding: 14px 16px;
  border: 1.5px solid #e2e8f0; margin-bottom: 4px;
}
.ob-row { display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13px; border-bottom: 1px solid #f1f5f9; }
.ob-row:last-child { border-bottom: none; }
.ob-lbl { color: #64748b; font-weight: 500; }
.ob-val { color: #1e293b; font-weight: 600; }
.tr-odendi td { opacity: 0.7; background: #f0fdf4; }

/* ===== GİDER LİSTESİ ===== */
.gider-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 18px;
}
.gider-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.gider-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.gstat-box {
  background: white; border-radius: 10px; padding: 12px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; min-width: 130px;
  border-top: 3px solid transparent;
}
.gstat-odeme   { border-top-color: #22c55e; }
.gstat-odenecek{ border-top-color: #f59e0b; }
.gstat-geciken { border-top-color: #ef4444; }
.gstat-lbl { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.gstat-val { font-size: 16px; font-weight: 800; color: #1e293b; }
.gstat-odeme   .gstat-val { color: #16a34a; }
.gstat-odenecek .gstat-val { color: #b45309; }
.gstat-geciken  .gstat-val { color: #dc2626; }

.gider-filter-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.gider-select {
  padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; color: #1e293b; background: white; outline: none; cursor: pointer;
}
.gider-select:focus { border-color: var(--accent); }

.gider-tablo-baslik {
  padding: 10px 20px; background: #f0fdf4; color: #15803d;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid #bbf7d0;
}

.gider-toplam-row {
  display: flex; justify-content: space-between; padding: 10px 20px;
  background: #f8fafc; border-top: 1px solid #f1f5f9;
  font-size: 13px; font-weight: 700; color: #1e293b;
}

/* Tekrarlayan Giderler - Ay seçici */
.ay-selector { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.ay-btn { padding: 8px 12px; border-radius: 8px; border: 1.5px solid #e2e8f0;
  background: white; cursor: pointer; font-size: 12px; font-weight: 600;
  color: #64748b; transition: all 0.2s; text-align: center; min-width: 70px; }
.ay-btn:hover { border-color: var(--accent); color: var(--accent); }
.ay-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.ay-btn .ay-tutar { font-size: 10px; font-weight: 500; display: block; margin-top: 2px; }
.ay-yil-select { padding: 8px 12px; border-radius: 8px; border: 1.5px solid #e2e8f0;
  background: white; font-size: 13px; font-weight: 600; color: #1e293b; outline: none; }

.ozet-row { display: flex; gap: 0; }
.ozet-box { flex: 1; padding: 16px 20px; text-align: center; }
.ozet-box:not(:last-child) { border-right: 1px solid #f1f5f9; }
.ozet-box .oz-lbl { font-size: 12px; color: #64748b; font-weight: 500; margin-bottom: 6px; }
.ozet-box .oz-val { font-size: 18px; font-weight: 800; }
.ozet-box.odendi .oz-val { color: #16a34a; }
.ozet-box.bekliyor .oz-val { color: #ea580c; }
.ozet-box.toplam .oz-val { color: #1e293b; }
.ozet-line { background: white; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden; margin-bottom: 20px; }
.ozet-line-header { padding: 14px 20px; background: #f8fafc; border-bottom: 1px solid #f1f5f9; font-size: 13px; font-weight: 700; color: #374151; }

/* ===== PERSONEL YENİ TASARIM ===== */
/* Üst aksiyon butonları */
.per-action-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.per-action-btn {
  display: flex; align-items: center; gap: 8px;
  background: #3b82f6; color: white; border: none; border-radius: 8px;
  padding: 11px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.2s; white-space: nowrap;
}
.per-action-btn:hover { background: #2563eb; }
.per-action-btn i { font-size: 14px; }

/* Filtre çubuğu */
.per-filter-bar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: white; border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 18px;
}
.per-filter-group { display: flex; flex-direction: column; gap: 4px; }
.per-filter-group label { font-size: 12px; font-weight: 600; color: #64748b; }
.per-sel { padding: 8px 10px; min-width: 130px; font-size: 13px; }

/* Stat satırı */
.per-stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.per-stat-box {
  background: white; border-radius: 12px; padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center;
  border-top: 3px solid #e2e8f0;
}
.psb-val { font-size: 20px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.psb-val.green { color: #16a34a; }
.psb-val.orange { color: #d97706; }
.psb-val.blue { color: #2563eb; }
.psb-lbl { font-size: 12px; color: #64748b; font-weight: 500; }
.psb-lbl i { margin-right: 4px; }

/* Personel kart ızgarası - 5 sütun */
.per-kart-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px; margin-bottom: 8px;
}
@media(max-width:1200px){ .per-kart-grid { grid-template-columns: repeat(4,1fr); } }
@media(max-width:900px){ .per-kart-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:600px){ .per-kart-grid { grid-template-columns: repeat(2,1fr); } }

/* Tek personel kartı */
.per-kart {
  background: white; border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 12px 14px; position: relative;
  transition: box-shadow 0.2s;
}
.per-kart:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); }

.per-kart-menu { position: absolute; top: 8px; right: 8px; }
.per-kart-sil {
  background: none; border: none; color: #cbd5e1; cursor: pointer;
  font-size: 13px; padding: 2px 5px; border-radius: 4px; transition: color 0.2s;
}
.per-kart-sil:hover { color: #ef4444; background: #fee2e2; }

/* Avatar */
.per-avatar-wrap { position: relative; margin-bottom: 10px; }
.per-avatar-daire {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
/* Gri silüet efekti - avatara overlay */
.per-avatar-daire::after {
  content: '\f007';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; font-size: 38px; color: rgba(255,255,255,0.22);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none;
}
.per-avatar-plus {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: #3b82f6; color: white; border: 2px solid white;
  font-size: 11px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background 0.2s;
}
.per-avatar-plus:hover { background: #2563eb; }

/* Ad ve durum */
.per-kart-ad {
  font-size: 13px; font-weight: 700; color: #1e293b;
  text-align: center; margin-bottom: 6px; letter-spacing: 0.3px;
}
.per-durum-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  margin-bottom: 6px;
}
.per-durum-badge.calisiyor { background: #dcfce7; color: #16a34a; }
.per-durum-badge.izinli { background: #fef9c3; color: #ca8a04; }

/* Maaş çubuğu */
.per-maas-bar {
  width: 100%; background: #bbf7d0; color: #15803d;
  font-size: 12px; font-weight: 700; text-align: center;
  padding: 5px 8px; border-radius: 5px; margin-bottom: 10px;
}
.per-maas-tip { font-weight: 500; opacity: 0.8; }

/* Detay satırları (toggle) */
.per-kart-detay {
  width: 100%; border-top: 1px solid #f1f5f9; padding-top: 8px; margin-bottom: 8px;
}
.per-detay-row {
  display: flex; justify-content: space-between;
  font-size: 11.5px; padding: 3px 0; color: #374151;
  border-bottom: 1px solid #f8fafc;
}
.per-detay-row:last-child { border-bottom: none; }
.per-detay-row span:first-child { color: #64748b; }
.per-detay-row .red { color: #dc2626; font-weight: 600; }

/* Hareketler dropdown menü */
.per-hareketler-menu {
  width: 100%; background: white; border: 1.5px solid #e2e8f0;
  border-radius: 10px; overflow: hidden; margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.phm-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; border: none; background: white;
  text-align: left; font-size: 13px; font-weight: 500; color: #374151;
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}
.phm-item:last-child { border-bottom: none; }
.phm-item:hover { background: #f0f9ff; color: #2563eb; }
.phm-item i { width: 16px; text-align: center; color: #3b82f6; }
.phm-sil { color: #dc2626 !important; }
.phm-sil i { color: #dc2626 !important; }
.phm-sil:hover { background: #fef2f2 !important; color: #dc2626 !important; }
.phm-kapat { color: #64748b !important; font-size: 12px; }
.phm-kapat i { color: #64748b !important; }
.phm-kapat:hover { background: #f8fafc !important; }

/* Alt butonlar */
.per-kart-btns {
  display: flex; gap: 6px; width: 100%; margin-top: auto;
}
.per-btn-hareketler, .per-btn-islem {
  flex: 1; padding: 8px 4px; border: none; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all 0.2s;
}
.per-btn-hareketler { background: #3b82f6; color: white; }
.per-btn-hareketler:hover { background: #2563eb; }
.per-btn-islem { background: #22c55e; color: white; }
.per-btn-islem:hover { background: #16a34a; }

/* ===== MÜŞTERİ DETAY PANELİ ===== */
#mst-detay-panel {
  position: fixed;
  inset: 0;
  background: #f4f6fa;
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Başlık */
.mdp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: white;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.mdp-avatar-wrap { position: relative; flex-shrink: 0; }
.mdp-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #94a3b8;
  border: 2px solid #cbd5e1;
}
.mdp-avatar-plus {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px;
  background: #3b82f6; color: white;
  border-radius: 50%; font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid white;
  transition: background 0.15s;
}
.mdp-avatar-plus:hover { background: #2563eb; }
.mdp-bilgi { flex: 1; min-width: 0; }
.mdp-musteri-adi {
  font-size: 16px; font-weight: 800;
  color: #1e293b; letter-spacing: 0.3px;
  text-transform: uppercase;
}
.mdp-tel { font-size: 13px; color: #3b82f6; font-weight: 600; margin-top: 3px; }
.mdp-adres { font-size: 12px; color: #64748b; margin-top: 2px; }

.mdp-header-btns { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.mdp-hbtn {
  padding: 7px 12px;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 12px; font-weight: 600;
  color: #374151; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.15s;
}
.mdp-hbtn:hover { background: #eff6ff; border-color: #3b82f6; color: #2563eb; }
.mdp-kapat-btn {
  width: 30px; height: 30px;
  background: #ef4444; color: white;
  border: none; border-radius: 6px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.mdp-kapat-btn:hover { background: #dc2626; }

/* Özet kutular */
.mdp-ozet-row {
  display: flex; gap: 8px;
  padding: 10px 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0; flex-wrap: wrap;
}
.mdp-ozet-box {
  flex: 1; min-width: 120px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px; padding: 10px 12px;
  text-align: center;
}
.mdp-ozet-sari { background: #fef9c3; border-color: #fde047; }
.mdp-ozet-durum { background: #fef2f2; border-color: #fca5a5; }
.mdp-ozet-lbl { font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.mdp-ozet-val { font-size: 15px; font-weight: 700; color: #1e293b; }
.mdp-ozet-link { font-size: 11px; color: #3b82f6; cursor: pointer; margin-top: 4px; }
.mdp-ozet-link:hover { text-decoration: underline; }
.mdp-goster-btn {
  padding: 5px 16px; background: white;
  border: 1.5px solid #fde047; border-radius: 6px;
  font-size: 12px; font-weight: 700; color: #92400e;
  cursor: pointer; margin: 4px 0;
}
.mdp-goster-btn:hover { background: #fef08a; }
.mdp-durum-tutar { font-size: 16px; font-weight: 800; color: #1e293b; }
.mdp-durum-yazi { font-size: 13px; font-weight: 700; margin-top: 3px; }
.mdp-help { color: #9ca3af; font-size: 10px; }

/* VKN ve Limit bilgisi */
.mdp-vkn { font-size: 11.5px; color: #94a3b8; margin-top: 3px; font-weight: 500; }
.mdp-limit-info { font-size: 11px; color: #64748b; margin-top: 2px; }

/* Bildirim satırları */
.mdp-bildirimler-wrap {
  flex-shrink: 0;
  max-height: 200px;
  overflow-y: auto;
  border-bottom: 1px solid #e2e8f0;
}
.mdp-bildirim-satir {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  animation: mdpSlideIn 0.2s ease;
}
@keyframes mdpSlideIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.mdp-bildirim-ikon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.mdp-bildirim-metin { flex: 1; min-width: 0; }
.mdp-bildirim-txt { font-size: 12.5px; color: #374151; font-weight: 500; line-height: 1.4; }
.mdp-bildirim-tarih { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.mdp-bildirim-kapat {
  background: none; border: none; font-size: 18px; color: #9ca3af;
  cursor: pointer; flex-shrink: 0; line-height: 1; padding: 0 4px;
  transition: color 0.15s;
}
.mdp-bildirim-kapat:hover { color: #ef4444; }

/* Notlar bandı (eski - geriye dönük uyum) */
.mdp-notlar-bar {
  background: #eff6ff; border-bottom: 1px solid #bfdbfe;
  padding: 8px 20px; flex-shrink: 0;
}
.mdp-not-icerik { font-size: 12.5px; color: #1e40af; }

/* Aksiyon butonları */
.mdp-action-row {
  display: flex; gap: 6px;
  padding: 10px 20px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0; flex-wrap: wrap;
}
.mdp-action-btn {
  padding: 8px 13px;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 7px; font-size: 12px; font-weight: 600;
  color: #1d4ed8; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.15s;
}
.mdp-action-btn:hover { background: #dbeafe; border-color: #3b82f6; }
.mdp-action-yesil {
  background: #22c55e; border-color: #16a34a; color: white;
}
.mdp-action-yesil:hover { background: #16a34a; }
.mdp-action-dropdown { background: #eff6ff; }
.mdp-action-tahsilat { background:#f0fdf4; border-color:#86efac; color:#16a34a; }
.mdp-action-tahsilat:hover { background:#dcfce7; border-color:#22c55e; }
.mdp-action-odeme { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }
.mdp-action-odeme:hover { background:#dbeafe; border-color:#3b82f6; }
.mdp-action-odemeisle { background:#f5f3ff; border-color:#c4b5fd; color:#6d28d9; }
.mdp-action-odemeisle:hover { background:#ede9fe; border-color:#7c3aed; }

/* Ödeme İşle Dropdown */
.mdp-dropdown-wrap {
  position: relative;
}
.mdp-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 190px;
  z-index: 500;
  overflow: hidden;
  animation: mdpDropIn 0.15s ease;
}
@keyframes mdpDropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.mdp-dd-item {
  padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: #374151;
  cursor: pointer; display: flex; align-items: center; gap: 9px;
  transition: background 0.1s;
}
.mdp-dd-item i { width: 16px; text-align: center; color: #6d28d9; }
.mdp-dd-item:hover { background: #f5f3ff; color: #6d28d9; }
.mdp-dd-item + .mdp-dd-item { border-top: 1px solid #f1f5f9; }

/* Tablo Toolbar */
.mdp-tablo-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  gap: 10px; flex-wrap: wrap;
  border-radius: 10px 10px 0 0;
}
.mdp-tablo-toolbar-left { display: flex; gap: 8px; align-items: center; flex: 1; }
.mdp-tablo-toolbar-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.mdp-ara-input {
  padding: 7px 11px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  font-size: 12.5px; color: #1e293b; outline: none;
  min-width: 200px; background: white;
}
.mdp-ara-input:focus { border-color: #3b82f6; }
.mdp-filtre-sel {
  padding: 7px 10px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  font-size: 12px; color: #374151; outline: none; background: white; cursor: pointer;
}
.mdp-filtre-sel:focus { border-color: #3b82f6; }
.mdp-tablo-ozet-chip {
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.mdp-borc-chip  { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.mdp-alinan-chip { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }

/* İşlem tablosu */
.mdp-tablo-wrap {
  flex: 1; overflow-y: auto;
  margin: 12px 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.mdp-tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
.mdp-tablo thead tr {
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  position: sticky; top: 0; z-index: 2;
}
.mdp-tablo tbody tr:hover { background: #f8fafc !important; }
.mdp-tablo th {
  padding: 10px 10px;
  text-align: left; font-size: 11px;
  font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.mdp-td { padding: 9px 10px; vertical-align: middle; font-size: 12.5px; }
.mdp-td-no { color: #94a3b8; font-size: 11px; font-weight: 700; text-align: center; width: 36px; }
.mdp-td-r { text-align: right; }
.mdp-tablo td { vertical-align: middle; }
.mdp-tur-dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; vertical-align: middle; margin-right: 4px;
}
.mdp-tur-borc    { border: 2px solid #94a3b8; background: transparent; }
.mdp-tur-tahsilat { background: #22c55e; }
.mdp-circ-bos {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; border: 1.5px solid #94a3b8;
  vertical-align: middle; margin-right: 3px;
}
.mdp-islem-btn {
  padding: 4px 10px;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  border-radius: 5px; font-size: 11px; font-weight: 600;
  color: #1d4ed8; cursor: pointer; white-space: nowrap;
}
.mdp-islem-btn:hover { background: #dbeafe; }
.mdp-sil-btn {
  padding: 4px 10px;
  background: white; border: 1.5px solid #fca5a5;
  border-radius: 5px; font-size: 11px; font-weight: 700;
  color: #dc2626; cursor: pointer;
}
.mdp-sil-btn:hover { background: #dc2626; color: white; border-color: #dc2626; }
.mdp-tablo-alt {
  padding: 10px 14px; font-size: 12px; color: #94a3b8;
  border-top: 1px solid #f1f5f9; background: #fafafa;
  border-radius: 0 0 10px 10px;
}

/* Tablo Toolbar */
.mdp-tablo-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0; background: #f8fafc;
  border-radius: 10px 10px 0 0;
}
.mdp-tablo-toolbar-left { display: flex; gap: 8px; align-items: center; flex: 1; }
.mdp-tablo-toolbar-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.mdp-ara-input {
  padding: 7px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 12.5px; color: #374151;
  outline: none; width: 220px;
}
.mdp-ara-input:focus { border-color: #3b82f6; }
.mdp-filtre-sel {
  padding: 7px 10px; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 12.5px; color: #374151;
  outline: none; cursor: pointer; background: white;
}
.mdp-filtre-sel:focus { border-color: #3b82f6; }
.mdp-tablo-ozet-chip {
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.mdp-borc-chip { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.mdp-alinan-chip { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }

/* Tür Badgeleri */
.mdp-tr:hover { background: #f0f7ff !important; transition: background 0.1s; }
.mdp-tur-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.mdp-tur-borc { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.mdp-tur-tahsilat { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }

/* Aksiyon buton renk varyasyonları — asıl tanım yukarıda (satır 616-619) */

/* Alt bilgi chip row */
.mdp-alt-bilgi-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.mdp-tel-chip { font-size: 12.5px; color: #2563eb; font-weight: 600; }
.mdp-tel-chip i { margin-right: 4px; }
.mdp-vkn-chip { font-size: 12px; color: #64748b; font-weight: 600; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; }
.mdp-vkn-chip i { margin-right: 3px; }
.mdp-email-chip { font-size: 12px; color: #64748b; }
.mdp-email-chip i { margin-right: 3px; }

/* Hesap Bilgileri Detay Paneli */
.mdp-detay-panel {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  padding: 14px 20px;
  flex-shrink: 0;
}
.mdp-detay-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mdp-detay-grup {
  background: white; border: 1.5px solid #e2e8f0;
  border-radius: 10px; padding: 12px 14px;
}
.mdp-detay-baslik {
  font-size: 12px; font-weight: 800; color: #374151;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 6px;
}
.mdp-detay-satir {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #f8fafc; gap: 8px;
}
.mdp-dk { font-size: 11.5px; color: #64748b; font-weight: 600; flex-shrink: 0; }
.mdp-dv { font-size: 12px; color: #1e293b; font-weight: 600; text-align: right; }

/* Mini modallar (tahsilat/ödeme) */
.mdp-mini-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mdp-mini-icerik {
  background: white; border-radius: 14px;
  padding: 24px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-height: 90vh; overflow-y: auto;
}
.mdp-mini-baslik {
  font-size: 16px; font-weight: 800; color: #1e293b;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px; justify-content: space-between;
}
.mdp-mini-kapat {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: #94a3b8; line-height: 1;
}
.mdp-mini-kapat:hover { color: #1e293b; }
.mdp-mini-form { display: flex; flex-direction: column; gap: 12px; }
.mdp-mf-row { display: flex; flex-direction: column; gap: 4px; }
.mdp-mf-row label { font-size: 12px; font-weight: 700; color: #374151; }
.mdp-mf-input {
  padding: 9px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 13px; color: #1e293b;
  outline: none; width: 100%; box-sizing: border-box;
}
.mdp-mf-input:focus { border-color: #3b82f6; }
.mdp-mini-kaydet {
  padding: 12px; background: #22c55e; color: white;
  border: none; border-radius: 8px; font-size: 14px;
  font-weight: 700; cursor: pointer; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mdp-mini-kaydet:hover { background: #16a34a; }

/* ===== MÜŞTERİ LİSTESİ ===== */
.ml-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ml-btn-yeni {
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ml-btn-yeni:hover { background: #16a34a; }
.ml-btn-grup {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.ml-btn-gray {
  padding: 8px 14px;
  background: white;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  white-space: nowrap;
}
.ml-btn-gray:hover { background: #f0f9ff; border-color: #3b82f6; color: #2563eb; }
.ml-toplam-badge {
  margin-left: auto;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  white-space: nowrap;
}

/* Arama satırı */
.ml-ara-bar { margin-bottom: 12px; }
.ml-ara-wrap {
  position: relative;
  max-width: 520px;
}
.ml-ara-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}
.ml-ara-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #1e293b;
  background: white;
  outline: none;
  box-sizing: border-box;
}
.ml-ara-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* Liste kartı */
.ml-liste-kart {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  overflow: hidden;
}

/* Her müşteri satırı */
.ml-satir {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.12s;
  min-height: 52px;
}
.ml-satir:hover { background: #f8fafc; }
.ml-satir:last-child { border-bottom: none; }

.ml-no {
  width: 42px;
  min-width: 42px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  padding: 12px 0;
  border-right: 1px solid #f1f5f9;
}

.ml-icerik {
  flex: 2;
  padding: 10px 14px;
  min-width: 0;
}
.ml-ad {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-alt-bilgi-satir { margin-top: 2px; }
.ml-tel {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 500;
}

.ml-adres-col {
  flex: 2;
  padding: 10px 14px;
  min-width: 0;
  border-left: 1px solid #f1f5f9;
}
.ml-adres-1 {
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-adres-2 {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.ml-bakiye-kut {
  width: 130px;
  min-width: 130px;
  margin: 6px 10px;
  border-radius: 7px;
  padding: 7px 10px;
  text-align: center;
  flex-shrink: 0;
}
.ml-bk-tutar {
  font-size: 13px;
  font-weight: 800;
  color: white;
}
.ml-bk-durum {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

.ml-islem-col {
  display: flex;
  gap: 4px;
  padding: 0 10px;
  flex-shrink: 0;
}
.ml-edit-btn, .ml-del-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s;
}
.ml-edit-btn { background: #eff6ff; color: #2563eb; }
.ml-edit-btn:hover { background: #2563eb; color: white; }
.ml-del-btn { background: #fef2f2; color: #dc2626; }
.ml-del-btn:hover { background: #dc2626; color: white; }

.ml-alt-bilgi {
  padding: 10px 16px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

/* ===== YENİ HESAP MODAL (sekmeli) ===== */
.mh-modal {
  max-width: 640px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  overflow: hidden;
}
.mh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
}
.mh-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mh-kapat {
  width: 28px;
  height: 28px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mh-kapat:hover { background: #dc2626; }

/* Sekmeler */
.mh-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
}
.mh-tab {
  padding: 11px 18px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.mh-tab:hover { color: #1e293b; background: #e2e8f0; }
.mh-tab.active {
  color: #2563eb;
  background: white;
  border-bottom-color: #2563eb;
}

/* Sekme panelleri */
.mh-panel {
  display: none;
  padding: 20px;
  max-height: 62vh;
  overflow-y: auto;
}
.mh-panel.active { display: block; }

.mh-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.mh-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.mh-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
}
.mh-help { color: #9ca3af; font-size: 11px; }
.mh-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  color: #1e293b;
  background: white;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.mh-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* Hesap Adı özel */
.mh-hesap-adi { background: #fffde7; border-color: #fcd34d; font-size: 14px; font-weight: 600; padding-left: 36px; }
.mh-hesap-adi:focus { border-color: #f59e0b; background: #fef9c3; }
.mh-sort-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 13px;
}
/* Hesap Kodu ikon */
.mh-kod-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #e2e8f0;
  color: #374151;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
}
/* Link satırları */
.mh-link-row { margin-bottom: 4px; }
.mh-link {
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
  font-weight: 500;
}
.mh-link:hover { text-decoration: underline; }

/* Yeşil oluştur butonu */
.mh-olustur-btn {
  width: 100%;
  padding: 13px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}
.mh-olustur-btn:hover { background: #16a34a; }

/* ===== TEDARİKÇİ DETAY PANELİ ===== */
#ted-detay-panel {
  position: fixed;
  inset: 0;
  background: #f4f6fa;
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== PERSONEL HAREKETLERİ TAM SAYFA PANELİ ===== */
#per-har-panel {
  position: fixed;
  inset: 0;
  background: #f4f6fa;
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sarı üst bant */
.php-topbar {
  background: #fffde7;
  border-bottom: 2px solid #fdd835;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  min-height: 64px;
}

.php-tarih-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.php-tarih-grup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.php-tarih-grup label {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
}

.php-date-input {
  padding: 6px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  background: white;
  outline: none;
}
.php-date-input:focus { border-color: #3b82f6; }

.php-git-btn {
  margin-top: 14px;
  padding: 7px 18px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.php-git-btn:hover { background: #2563eb; }

/* Orta personel adı */
.php-per-adi {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Sağ ozet kutusu */
.php-ozet-kart {
  position: relative;
  background: #fff8e1;
  border: 1.5px solid #fdd835;
  border-radius: 10px;
  padding: 10px 40px 10px 16px;
  min-width: 220px;
  text-align: center;
  flex-shrink: 0;
}

.php-ozet-kapat {
  position: absolute;
  top: 4px;
  right: 6px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.php-ozet-kapat:hover { background: #dc2626; }

.php-ozet-baslik {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.php-ozet-alt {
  font-size: 11.5px;
  color: #374151;
  margin-top: 3px;
}

/* Aksiyon buton satırı */
.php-btn-row {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.php-action-btn {
  padding: 7px 14px;
  background: white;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.php-action-btn:hover { background: #f8fafc; border-color: #3b82f6; color: #3b82f6; }
.php-action-btn i { font-size: 13px; }

.php-ara-input {
  padding: 7px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 7px;
  font-size: 13px;
  width: 180px;
  outline: none;
  background: white;
  color: #1e293b;
}
.php-ara-input:focus { border-color: #3b82f6; }

/* Tablo alanı */
.php-tablo-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: white;
  margin: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.php-tablo {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.php-tablo thead tr {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.php-tablo th {
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.php-tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}

.php-tr:hover { background: #f8fafc; }
.php-tr:nth-child(odd) { background: #fef9c3; }
.php-tr:nth-child(odd):hover { background: #fef08a; }

.php-tablo td {
  padding: 11px 14px;
  color: #1e293b;
  vertical-align: middle;
}

.php-sil-btn {
  padding: 4px 12px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.php-sil-btn:hover { background: #dc2626; color: white; }

.php-kayit-info {
  margin-top: 14px;
  font-size: 12.5px;
  color: #64748b;
  padding: 0 2px;
}

/* ===== YENİ PERSONEL EKLE MODAL (tam sayfa form) ===== */
.modal-personel-full {
  max-width: 680px !important;
  padding: 0 !important;
  border-radius: 14px !important;
  overflow: hidden;
}

/* Teal başlık */
.per-modal-header {
  background: #0d9488;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.per-modal-geri {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.per-modal-geri:hover { background: rgba(255,255,255,0.25); }
.per-modal-title-wrap { flex: 1; }
.per-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.5px;
}
.per-modal-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 3px;
}
.per-req { color: #fde68a; font-weight: 700; }

/* Form gövdesi */
.per-form-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 70vh;
  overflow-y: auto;
}

/* İki sütunlu satır */
.per-form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

/* Tek alan sarmalayıcı */
.per-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.per-field-full {
  grid-column: 1 / -1;
  margin-bottom: 16px;
}

/* Etiket */
.per-field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Input / Select / Textarea */
.per-field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #1e293b;
  background: white;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.per-field-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}
.per-field-input::placeholder { color: #94a3b8; }

/* Kayıt butonu */
.per-kayit-btn {
  width: 100%;
  padding: 14px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}
.per-kayit-btn:hover { background: #16a34a; }

/* ESKİ personel-card (geriye uyumluluk) */
.personel-card { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.pc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pc-avatar { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; font-weight: 700; color: white; flex-shrink: 0; }
.pc-name { font-size: 14px; font-weight: 700; color: #1e293b; }
.pc-title { font-size: 12px; color: #64748b; }
.pc-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0;
  border-bottom: 1px solid #f8fafc; }
.pc-row:last-child { border-bottom: none; }
.pc-row .label { color: #64748b; }
.pc-row .value { font-weight: 600; color: #1e293b; }

/* Proje kartları */
.proje-card { background: white; border-radius: 12px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px; }
.proje-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.proje-adi { font-size: 15px; font-weight: 700; color: #1e293b; }
.proje-progress { height: 6px; background: #f1f5f9; border-radius: 3px; margin: 10px 0; }
.proje-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.proje-meta { display: flex; gap: 16px; font-size: 12px; color: #64748b; flex-wrap: wrap; }
.proje-meta span { display: flex; align-items: center; gap: 4px; }

#toast { position: fixed; bottom: 24px; right: 24px; background: #1e293b; color: white;
  padding: 14px 20px; border-radius: 10px; font-size: 13px; font-weight: 600;
  z-index: 999; display: none; align-items: center; gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2); }

.vade-warning { background: #fff7ed; border-left: 3px solid #f59e0b; }
.vade-danger { background: #fef2f2; border-left: 3px solid #ef4444; }

@media(max-width:768px){
  #sidebar { width: 64px; }
  #sidebar .logo-text, #sidebar .logo-sub, #sidebar .menu-label, #sidebar .menu-arrow, #sidebar .submenu { display:none; }
  #main { margin-left: 64px; }
  .chart-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════
   KASA & BANKA — Modern Hesap Yönetimi
   ══════════════════════════════════════════════════════════ */

/* Toolbar */
.kasa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1.5px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}
.kasa-toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kasa-toolbar-right { display: flex; align-items: center; gap: 8px; }

/* Dropdown */
.kasa-dd-wrap { position: relative; }
.kasa-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 210px;
  z-index: 600;
  overflow: hidden;
  animation: mdpDropIn 0.15s ease;
}
.kasa-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
}
.kasa-dd-item:hover { background: #f5f3ff; color: #7c3aed; }
.kasa-dd-item + .kasa-dd-item { border-top: 1px solid #f1f5f9; }
.kasa-dd-item i { width: 16px; text-align: center; color: #6d28d9; }

.kasa-para-sel {
  padding: 6px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
}

/* 4 Grup Kart Grid */
.kasa-grup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px 20px;
}
@media(max-width: 900px){ .kasa-grup-grid { grid-template-columns: 1fr; } }

.kasa-grup-kart {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.kgk-baslik {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.kgk-baslik:hover { background: #f8fafc; }
.kgk-bas-sol { display: flex; align-items: center; gap: 14px; }
.kgk-ikon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.kgk-ad { font-size: 14px; font-weight: 800; color: #1e293b; letter-spacing: 0.3px; }
.kgk-toplam { font-size: 16px; font-weight: 700; color: #374151; margin-top: 2px; }
.kgk-ok { font-size: 12px; color: #94a3b8; transition: transform 0.2s; }
.kgk-icerik { border-top: 1.5px solid #f1f5f9; }

/* Hesap satırı (grup içi) */
.kgk-hesap-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  transition: background 0.1s;
}
.kgk-hesap-satir:hover { background: #f8fafc; }
.kgk-hesap-satir + .kgk-hesap-satir { border-top: 1px solid #f1f5f9; }
.kgk-hs-sol { flex: 1; }
.kgk-hs-ad   { font-size: 13px; font-weight: 700; color: #1e293b; }
.kgk-hs-iban { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.kgk-hs-sag  { text-align: right; }
.kgk-hs-tutar { font-size: 14px; font-weight: 700; }
.kgk-hs-yesil { color: #16a34a; }
.kgk-hs-mor   { color: #7c3aed; }
.kgk-hs-pembe { color: #be185d; }

/* Toplam Varlıklar */
.kasa-toplam-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  margin: 0 20px;
  background: #1e293b;
  border-radius: 10px;
  color: #fff;
}
.kasa-toplam-lbl   { font-size: 14px; font-weight: 700; color: #94a3b8; }
.kasa-toplam-tutar { font-size: 18px; font-weight: 800; }

/* ══════════════════════════════════════════════════════════
   FİYAT TEKLİFLERİ
   ══════════════════════════════════════════════════════════ */

.teklif-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1.5px solid #e2e8f0;
  gap: 10px;
  flex-wrap: wrap;
}
.teklif-toolbar-left  { display: flex; gap: 10px; align-items: center; }
.teklif-toolbar-right { display: flex; gap: 8px;  align-items: center; position: relative; }

/* Filtre dropdown */
.teklif-dd-wrap { position: relative; }
.teklif-filtre-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 600;
  overflow: hidden;
  animation: mdpDropIn 0.15s ease;
}
.teklif-filtre-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 600; color: #374151;
  cursor: pointer; transition: background 0.1s;
}
.teklif-filtre-item:hover { background: #f0f9ff; color: #2563eb; }
.teklif-filtre-item + .teklif-filtre-item { border-top: 1px solid #f1f5f9; }
.teklif-filtre-item i { width: 16px; text-align: center; color: #3b82f6; }

/* Özet şerit */
.teklif-ozet-bar {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  flex-wrap: wrap;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
}
.teklif-ozet-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  user-select: none;
}
.teklif-chip-tumu  { background: #eff6ff; color: #1d4ed8; }
.teklif-chip-bekle { background: #fefce8; color: #854d0e; }
.teklif-chip-kabul { background: #f0fdf4; color: #15803d; }
.teklif-chip-red   { background: #fef2f2; color: #b91c1c; }
.teklif-ozet-chip:hover { filter: brightness(0.95); }
.teklif-chip-aktif { border-color: currentColor !important; box-shadow: 0 0 0 2px rgba(0,0,0,0.08); }

.tklc-sayi {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 800;
}

/* Not satırı */
.teklif-not-satir {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  font-size: 12.5px; color: #475569;
  background: #f0f9ff;
  border-bottom: 1px solid #bae6fd;
}

/* Alt bilgi */
.teklif-alt-bilgi {
  padding: 10px 16px;
  font-size: 12px; color: #94a3b8; font-weight: 600;
  border-top: 1px solid #f1f5f9;
}

/* Durum pilleri */
.tklpill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700;
}
.tklpill-bekle { background: #fefce8; color: #854d0e; }
.tklpill-kabul { background: #f0fdf4; color: #15803d; }
.tklpill-red   { background: #fef2f2; color: #b91c1c; }

/* İşlem butonları */
.tklislem-wrap { display: flex; gap: 4px; align-items: center; }
.tklbtn {
  width: 28px; height: 28px;
  border: none; border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all 0.15s;
}
.tklbtn-kabul  { background: #dcfce7; color: #16a34a; }
.tklbtn-kabul:hover  { background: #16a34a; color: #fff; }
.tklbtn-red    { background: #fee2e2; color: #dc2626; }
.tklbtn-red:hover    { background: #dc2626; color: #fff; }
.tklbtn-fatura { background: #dbeafe; color: #2563eb; }
.tklbtn-fatura:hover { background: #2563eb; color: #fff; }
.tklbtn-sil    { background: #f1f5f9; color: #94a3b8; }
.tklbtn-sil:hover    { background: #fee2e2; color: #dc2626; }

/* ═══════════════════════════════════════════════════════
   TEKLİF PANEL (tkp-) – Tam Sayfa Teklif Hazırlama
   ═══════════════════════════════════════════════════════ */

#teklif-panel {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #f8fafc;
  overflow: hidden;
}

/* Header */
.tkp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
  gap: 12px;
}
.tkp-header-sol { display: flex; align-items: center; gap: 16px; }
.tkp-header-sag { display: flex; align-items: center; gap: 10px; }
.tkp-geri-btn {
  display: flex; align-items: center; gap: 6px;
  background: #f1f5f9; border: none; color: #475569;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .15s;
}
.tkp-geri-btn:hover { background: #e2e8f0; }
.tkp-baslik { font-size: 17px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.tkp-alt-bilgi { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Body */
.tkp-body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.tkp-sol {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
}
.tkp-sag {
  overflow-y: auto;
  padding: 20px;
  background: #f1f5f9;
  border-left: 1px solid #e2e8f0;
}

/* Kart */
.tkp-kart {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}
.tkp-kart-baslik {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tkp-kart-baslik i { color: #3b82f6; }

/* Form */
.tkp-form-grid { display: flex; flex-direction: column; gap: 12px; }
.tkp-fg-row { display: flex; flex-direction: column; gap: 5px; }
.tkp-fg-row label { font-size: 12px; font-weight: 600; color: #374151; }
.tkp-input {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}
.tkp-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* Kalem Satırları */
.tkp-kalem-ekle-btn {
  background: #eff6ff; color: #2563eb; border: 1.5px solid #bfdbfe;
  padding: 6px 12px; border-radius: 7px; cursor: pointer;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.tkp-kalem-ekle-btn:hover { background: #dbeafe; }

.tkp-tablo-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 7px;
  margin-bottom: 6px;
}
.tkp-th {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tkp-kalem-satir {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  animation: fadeInRow .15s ease;
}
.tkp-kalem-satir:last-child { border-bottom: none; }
@keyframes fadeInRow { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.tkp-kd { display: flex; align-items: center; }
.tkp-kalem-input {
  width: 100%;
  padding: 6px 8px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
}
.tkp-kalem-input:focus { outline: none; border-color: #3b82f6; }
.tkp-ki-num { text-align: right; }
.tkp-sil-btn {
  width: 28px; height: 28px;
  border: none; border-radius: 6px; cursor: pointer;
  background: #fee2e2; color: #dc2626;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all .15s;
}
.tkp-sil-btn:hover { background: #dc2626; color: #fff; }

/* Toplam Kutusu */
.tkp-toplam-kutu {
  margin-top: 14px;
  border-top: 2px solid #e2e8f0;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
  margin-left: auto;
}
.tkp-toplam-satir {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
}
.tkp-kdv-detay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  color: #64748b;
  font-size: 12px;
}
.tkp-toplam-genel {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  border-top: 2px solid #1e293b;
  padding-top: 8px;
  margin-top: 4px;
}

/* Ön İzleme */
.tkp-onizleme-icerik {
  font-size: 12px;
  line-height: 1.5;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.tkp-prev { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.tkp-prev-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1e293b;
}
.tkp-prev-firma-ad { font-size: 15px; font-weight: 800; color: #1e293b; }
.tkp-prev-firma-alt { font-size: 11px; color: #64748b; margin-top: 2px; }
.tkp-prev-no { text-align: right; }
.tkp-prev-no-lbl { font-size: 16px; font-weight: 800; color: #2563eb; }
.tkp-prev-no-val { font-size: 13px; font-weight: 700; color: #1e293b; margin-top: 2px; }
.tkp-prev-meta { font-size: 11px; color: #64748b; margin-top: 2px; }
.tkp-prev-musteri { margin: 10px 0 6px; font-size: 13px; color: #1e293b; }
.tkp-prev-konu { margin: 4px 0 10px; font-size: 12px; color: #475569; }
.tkp-prev-tablo { width: 100%; border-collapse: collapse; margin: 12px 0; }
.tkp-prev-tablo th { background: #1e293b; color: #fff; padding: 7px 8px; font-size: 11px; text-align: left; }
.tkp-prev-tablo td { padding: 6px 8px; border-bottom: 1px solid #e2e8f0; font-size: 11px; }
.tkp-prev-tablo tr:nth-child(even) td { background: #f8fafc; }
.tkp-prev-toplam { margin-left: auto; width: 240px; margin-top: 10px; }
.tkp-prev-top-satir { display: flex; justify-content: space-between; padding: 4px 0; font-size: 11px; border-bottom: 1px solid #f1f5f9; color: #475569; }
.tkp-prev-genel { font-size: 13px; font-weight: 800; border-top: 2px solid #1e293b; padding-top: 6px; color: #1e293b; border-bottom: none; }
.tkp-prev-notlar { margin-top: 12px; font-size: 11px; color: #475569; background: #f8fafc; padding: 8px 10px; border-radius: 6px; }

/* Tasarım Modal */
.tkp-tasarim-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
}
.tkp-tasarim-modal {
  background: #fff;
  border-radius: 16px;
  width: 860px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.tkp-tasarim-baslik {
  font-size: 18px; font-weight: 800; color: #1e293b;
  margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
}
.tkp-tasarim-baslik i { color: #8b5cf6; }
.tkp-tasarim-altyazi { font-size: 13px; color: #64748b; margin-bottom: 20px; }
.tkp-tasarim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.tkp-tasarim-kart {
  border: 2.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.tkp-tasarim-kart:hover { border-color: #3b82f6; box-shadow: 0 4px 16px rgba(59,130,246,.2); transform: translateY(-2px); }
.tkp-tasarim-kart.secili { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.tkp-tasarim-kart.secili::after {
  content: '✓';
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px;
  background: #2563eb; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.tkp-tasarim-onizle {
  height: 160px;
  overflow: hidden;
  position: relative;
}
.tkp-tasarim-ad {
  padding: 10px 12px;
  font-size: 12px; font-weight: 700; color: #1e293b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: 6px;
}
.tkp-tasarim-alt { font-size: 11px; color: #64748b; font-weight: 400; }

/* Renk seçici */
.tkp-renk-secici {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 20px;
}
.tkp-renk-alani { display: flex; flex-direction: column; gap: 8px; }
.tkp-renk-label { font-size: 12px; font-weight: 600; color: #374151; }
.tkp-renk-btn {
  width: 30px; height: 30px;
  border-radius: 50%; border: 2.5px solid transparent;
  cursor: pointer; transition: all .15s;
}
.tkp-renk-btn.secili { border-color: #1e293b; transform: scale(1.15); }
.tkp-renk-btn:hover { transform: scale(1.1); }

/* Tasarım ayarları */
.tkp-tasarim-ayarlar {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 20px;
}
.tkp-ta-grup { display: flex; flex-direction: column; gap: 6px; }
.tkp-ta-grup label { font-size: 12px; font-weight: 600; color: #374151; }
.tkp-ta-grup select, .tkp-ta-grup input {
  padding: 8px 10px; border: 1.5px solid #e2e8f0;
  border-radius: 7px; font-size: 13px; font-family: inherit;
}
.tkp-ta-grup select:focus, .tkp-ta-grup input:focus { outline: none; border-color: #3b82f6; }

/* Responsive */
@media (max-width: 900px) {
  .tkp-body { grid-template-columns: 1fr; }
  .tkp-sag { display: none; }
  .tkp-tasarim-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tkp-tasarim-grid { grid-template-columns: 1fr; }
}

/* Faturaya çevrildi pill */
.tklpill-fatura { background: #eff6ff; color: #1d4ed8; }

/* Teklif Düzenle butonu hover */
.tklbtn:hover { filter: brightness(.9); }

/* Teklif edit button style */
.tklbtn { border: none; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: all .15s; display: inline-flex; align-items: center; justify-content: center; }

/* ── Teklif Kalem - İskonto & Brüt Fiyat ── */
.tkp-brt-fiyat {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
  text-align: right;
}
.tkp-toplam-cell {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* ═══════════════════════════════════════════════════════
   TEKRARLAYANGELİR (tg-) – Kira & Düzenli Gelir Takibi
   ═══════════════════════════════════════════════════════ */

/* Özet grid */
.tg-ozet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.tg-ozet-kart {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.tg-ok-ikon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.tg-ok-yesil  .tg-ok-ikon { background:#dcfce7; color:#16a34a; }
.tg-ok-sari   .tg-ok-ikon { background:#fef9c3; color:#ca8a04; }
.tg-ok-kirmizi.tg-ok-ikon { background:#fee2e2; color:#dc2626; }
.tg-ok-mavi   .tg-ok-ikon { background:#dbeafe; color:#2563eb; }
.tg-ok-lbl { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.tg-ok-val { font-size: 18px; font-weight: 800; color: #1e293b; margin-top: 2px; }

/* Gelir Kartı */
.tg-kart {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.tg-kart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}
.tg-kart-sol { display: flex; align-items: flex-start; gap: 14px; }
.tg-kart-sag { text-align: right; flex-shrink: 0; }
.tg-kart-ikon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; flex-shrink: 0;
}
.tg-kart-baslik { font-size: 15px; font-weight: 700; color: #1e293b; }
.tg-kart-alt    { font-size: 12px; margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tg-kart-tutar  { font-size: 20px; font-weight: 800; color: #16a34a; }

/* Sözleşme bar */
.tg-sozlesme-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  color: #475569;
  gap: 10px;
  flex-wrap: wrap;
}

/* Ödeme tablosu wrapper */
.tg-odeme-tablo-wrap {
  overflow-x: auto;
}
.tg-odeme-tablo-wrap .tbl th,
.tg-odeme-tablo-wrap .tbl td { padding: 9px 14px; font-size: 13px; }

/* Badge */
.tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tg-badge-yesil   { background: #dcfce7; color: #16a34a; }
.tg-badge-kirmizi { background: #fee2e2; color: #dc2626; }
.tg-badge-sari    { background: #fef9c3; color: #92400e; }
.tg-badge-mavi    { background: #dbeafe; color: #1d4ed8; }
.tg-badge-turuncu { background: #ffedd5; color: #c2410c; }

@media (max-width: 900px) {
  .tg-ozet-grid { grid-template-columns: repeat(2,1fr); }
  .tg-kart-header { flex-direction: column; }
  .tg-kart-sag { text-align: left; }
  .tg-sozlesme-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 600px) {
  .tg-ozet-grid { grid-template-columns: 1fr; }
}
