/* SearchComp — Dijitalizma · "Digital Momentum" teması
   Ajans mavisi (#104CBA) + logo mavisi (#2288BF) · Montserrat + Hanken Grotesk · dikey sidebar
   Değişken adları (--navy/--gold) tarihsel; değerleri Dijitalizma paletidir. */
:root {
  /* Marka / yapı */
  --navy:        #104cba;   /* primary — başlık, birincil buton (dijitalizma.net ana mavi) */
  --navy-deep:   #0b1f45;   /* sidebar zemini */
  --navy-800:    #071630;
  --gold:        #2288bf;   /* accent — logo mavisi */
  --gold-soft:   #d6ecf7;
  --gold-deep:   #17638c;

  /* Eski değişken adları korunuyor (JS/HTML class'ları kırılmasın) */
  --brand:       #104cba;
  --brand-dk:    #0b1f45;
  --brand-faint: rgba(16, 76, 186, 0.06);
  --accent:      #2288bf;
  --accent-faint:rgba(34, 136, 191, 0.22);
  --bg:          #f4f6fa;
  --surface:     #ffffff;
  --line:        #e2e8f0;
  --line-2:      #e3e7ee;
  --text:        #101828;
  --text-mid:    #56607a;
  --text-lt:     #8a93a8;
  --ok:          #2f855a;
  --warn:        #b7791f;
  --err:         #ba1a1a;
  --orange:      #f15822;

  /* Tipografi */
  --font-d: 'Montserrat', system-ui, sans-serif;      /* display / başlık / sayı */
  --font-b: 'Hanken Grotesk', system-ui, sans-serif;  /* gövde / UI */
  --font-m: 'IBM Plex Mono', ui-monospace, monospace; /* e-posta / id */

  --radius: 8px;
  --radius-sm: 4px;
  --radius-pill: 9999px;
  --shadow: 0 4px 15px rgba(7, 22, 48, 0.08);
  --shadow-sm: 0 1px 3px rgba(7, 22, 48, 0.06);
  --transition: 0.18s ease;
  --side-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-b); font-size: 15px; color: var(--text); background: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

h1 { font-family: var(--font-d); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-family: var(--font-b); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mid); margin-bottom: 14px; }
h3 { font-family: var(--font-d); font-weight: 600; }
.mono { font-family: var(--font-m); }

/* ================= Login ================= */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #e9eef7 0%, var(--bg) 60%); }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 36px; width: 100%; max-width: 384px; text-align: center;
}
.login-logo { margin: 0 auto 18px; }
.login-card h1 { font-family: var(--font-d); color: var(--navy); font-weight: 700; font-size: 1.05rem; margin-bottom: 24px; }
.login-card form { text-align: left; }
.dot-divider { display: flex; justify-content: center; gap: 7px; margin-bottom: 16px; }
.dot-divider span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.dot-divider span:nth-child(2) { opacity: 0.65; }
.dot-divider span:nth-child(3) { opacity: 0.35; }

/* ================= Form ================= */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-mid); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--text); background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--accent-faint); }
textarea { font-family: var(--font-m); font-size: 0.82rem; resize: vertical; }

/* Butonlar */
.btn-primary {
  width: 100%; padding: 11px 16px; background: var(--navy); color: #fff; border-radius: var(--radius-sm);
  font-family: var(--font-b); font-weight: 600; transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--navy-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  padding: 9px 16px; background: transparent; color: var(--navy); border: 1px solid var(--navy);
  border-radius: var(--radius-sm); font-weight: 600; transition: background var(--transition), color var(--transition); white-space: nowrap;
}
.btn-secondary:hover { background: var(--navy); color: #fff; }
/* Logo mavisi "başarı/kaydet" ikincil aksiyon */
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); color: #fff; border-color: var(--gold-deep); }
.btn-ghost { color: var(--text-mid); font-size: 0.85rem; padding: 7px 10px; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.btn-ghost:hover { background: var(--brand-faint); color: var(--navy); }
.form-error { color: var(--err); font-size: 0.85rem; margin-bottom: 12px; }
.form-ok { color: var(--gold-deep); font-size: 0.85rem; margin-top: 10px; font-weight: 600; }

/* ================= Sidebar kabuğu ================= */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w);
  background: var(--navy-deep); color: #c3cede; display: flex; flex-direction: column;
  padding: 22px 16px; z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 22px; }
.side-logo-img { width: 100%; max-width: 190px; height: auto; }
.brand-mark { display: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--gold);
  place-items: center; color: var(--navy-deep); flex: none; }
.brand-mark svg { width: 22px; height: 22px; }
.side-brand .bt { font-family: var(--font-d); font-weight: 800; font-size: 1.12rem; color: #fff; line-height: 1.1; }
.side-brand .bs { display: block; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: var(--radius-sm); color: #95a1b8; font-weight: 500; font-size: 0.92rem;
  border-left: 3px solid transparent; transition: background var(--transition), color var(--transition);
}
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #eef2f8; }
.nav-item.active { background: rgba(34,136,191,0.14); color: #fff; border-left-color: var(--gold); }
.nav-item.active svg { color: var(--gold); }
.side-foot { margin-top: auto; padding-top: 16px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side-user .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: var(--navy-deep);
  display: grid; place-items: center; font-family: var(--font-d); font-weight: 700; font-size: 0.85rem; flex: none; }
.side-user .su-name { color: #fff; font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.side-user .su-role { display: block; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: #7a8699; margin-top: 2px; }
.side-logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; margin-top: 6px;
  color: #95a1b8; font-size: 0.86rem; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.side-logout:hover { background: rgba(255,255,255,0.05); color: #fff; }
.side-logout svg { width: 18px; height: 18px; }

/* ================= İçerik alanı ================= */
.app-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 36px); height: 74px; border-bottom: 1px solid var(--line);
  background: rgba(245,245,245,0.85); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 1.5rem; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-mid); font-weight: 600; }
.topbar-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-family: var(--font-d); font-weight: 700; font-size: 0.85rem; letter-spacing: 0; }
main { padding: 28px clamp(16px, 3vw, 36px) 80px; flex: 1; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 24px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Kart başlığı (ikon + başlık + sağ aksiyon) */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-head-l { display: flex; align-items: center; gap: 12px; }
.card-head-l h2 { margin: 0; }
.card-ico { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--brand-faint);
  color: var(--navy); display: grid; place-items: center; flex: none; }
.card-ico svg { width: 19px; height: 19px; }
.card-link { font-size: 0.82rem; font-weight: 600; color: var(--gold-deep); display: inline-flex; align-items: center; gap: 5px; }
.card-link:hover { color: var(--navy); }
.page-sub { color: var(--text-mid); margin: -6px 0 24px; font-size: 0.98rem; }
.page-title-lg { font-family: var(--font-d); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em;
  color: var(--navy); text-transform: none; margin-bottom: 4px; }
.page-title-lg + .page-sub { margin-top: 0; }

/* Sayı-kutusu üçlüsü (Talep / Bulunan / Zengin) */
.numtrio { display: inline-flex; gap: 5px; align-items: center; }
.numbox { min-width: 44px; text-align: center; padding: 5px 8px; border-radius: var(--radius-sm);
  background: #eef2f8; font-family: var(--font-d); font-weight: 700; font-size: 0.82rem; color: var(--text); }
.numbox.gold { background: var(--accent-faint); color: var(--gold-deep); }
.numsep { color: var(--text-lt); }

/* ================= Dashboard ================= */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.stat-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mid); }
.stat-num { font-family: var(--font-d); font-size: 1.9rem; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.activity li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--text-mid); }
.activity li:last-child { border-bottom: none; }
.empty { color: var(--text-mid); font-size: 0.88rem; padding: 12px 0; }

/* ================= Tablolar (zebra) ================= */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th {
  text-align: left; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-mid); padding: 12px 12px; background: #fafafa;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:nth-child(even) { background: #fafbfd; }
.table tbody tr:hover { background: var(--brand-faint); }
.table select { width: auto; padding: 6px 10px; font-size: 0.82rem; }

/* Durum / segment çipleri — pill */
.badge {
  display: inline-block; font-family: var(--font-b); font-size: 0.72rem; font-weight: 600;
  padding: 4px 11px; border-radius: var(--radius-pill); letter-spacing: 0.01em; white-space: nowrap;
}
.badge-fit-high { background: var(--accent-faint); color: var(--gold-deep); }
.badge-fit-mid  { background: rgba(16,76,186,0.08); color: var(--navy); }
.badge-fit-low  { background: #eef2f8; color: var(--text-mid); }
.badge-seg      { background: var(--gold-soft); color: var(--gold-deep); }
.badge-verified { background: rgba(79,125,95,0.14); color: var(--ok); }
.badge-guessed  { background: rgba(183,121,31,0.14); color: var(--warn); }
.badge-none     { background: #eef2f8; color: var(--text-mid); }
.badge-status   { background: var(--surface); color: var(--gold-deep); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-b); }
.badge-err      { background: rgba(186,26,26,0.10); color: var(--err); }
.prod-tags { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; }

/* Fit skoru — düz sayı vurgusu */
.fit-num { font-family: var(--font-d); font-weight: 700; color: var(--gold-deep); }
.fit-num.low { color: var(--orange); }

/* ================= Arama ================= */
.search-form { display: grid; grid-template-columns: 90px 1fr 1fr 1.3fr 1.3fr 90px; gap: 14px; align-items: end; }
.search-form .btn-primary { width: auto; padding: 11px 22px; grid-column: 1 / -1; justify-self: end; }
.search-status { margin-top: 14px; font-size: 0.88rem; color: var(--navy); font-family: var(--font-m); }
/* Sayfalama */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.pager .pager-info { margin-right: auto; font-size: 0.82rem; color: var(--text-mid); }
.pg-btn { min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: var(--font-d); font-weight: 700; font-size: 0.85rem; }
.pg-btn:hover:not(:disabled) { border-color: var(--navy); }
.pg-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pg-btn:disabled { opacity: 0.4; cursor: default; }
.search-status.err { color: var(--err); }
/* Arama alt kartları / ilerleme çubuğu */
.progress { height: 8px; background: #e7ecf3; border-radius: var(--radius-pill); overflow: hidden; margin: 10px 0; }
.progress > span { display: block; height: 100%; background: var(--gold-deep); border-radius: var(--radius-pill); }

/* ================= CRM ================= */
.crm-filters { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.crm-filters input, .crm-filters select { width: auto; min-width: 120px; }
.crm-filters #cf-q { min-width: 200px; }
.crm-filters #rf-q { min-width: 240px; }
.crm-filters .form-group { margin-bottom: 0; }
.crm-count { margin-left: auto; font-family: var(--font-d); font-weight: 700; color: var(--navy); }

/* CRM üst düzen: filtreler | toplam+aksiyon */
.crm-top { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-bottom: 24px; }
.crm-top .card { margin-bottom: 0; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: end; }
.filter-grid .fg-wide { grid-column: 1 / -1; }
.fg-inline { display: flex; gap: 12px; align-items: end; }
.fg-inline .form-group { flex: 1; margin-bottom: 0; }
.fg-inline .btn-secondary { flex: 0 0 auto; padding-top: 10px; padding-bottom: 10px; }
.crm-actions-card { display: flex; flex-direction: column; gap: 16px; justify-content: center; align-items: center; text-align: center; }
.crm-total { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.crm-count-big { font-family: var(--font-d); font-weight: 800; font-size: 2rem; color: var(--navy); letter-spacing: -0.02em; }
.crm-actions-btns { display: grid; gap: 10px; width: 100%; max-width: 240px; }
.crm-actions-btns .btn-primary, .crm-actions-btns .btn-secondary { width: 100%; }
.crm-actions-msg { color: var(--err); font-size: 0.82rem; min-height: 1em; margin: 0; }
#crm-enroll-result { color: var(--err); }
@media (max-width: 900px) { .crm-top { grid-template-columns: 1fr; } }

/* ================= Ayarlar ================= */
.keys-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem;
}
.keys-list li:last-child { border-bottom: none; }
.keys-list .mono { font-size: 0.8rem; color: var(--text-mid); }
/* Kota kullanımı — ilerleme çubukları */
#usage-list .usage-item { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
#usage-list .usage-item:last-child { border-bottom: none; }
.usage-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.usage-name { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); }
.usage-item .progress { margin: 0; }
.key-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.key-test { font-size: 0.75rem; }
.key-result { font-size: 0.75rem; max-width: 260px; }
.inline-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 120px; }
.inline-form .narrow { flex: 0 1 90px; }
.phase-note p { color: var(--text-mid); }

.sub { font-size: 0.75rem; color: var(--text-mid); }
.hint { font-size: 0.8rem; color: var(--text-mid); margin: 10px 0; line-height: 1.5; }
.hint code { background: var(--brand-faint); padding: 1px 6px; border-radius: var(--radius-sm); font-family: var(--font-m); font-size: 0.75rem; }
.btn-inline { width: auto; padding: 9px 18px; }

/* ================= CRM aksiyon barları ================= */
.crm-enroll-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.crm-enroll-bar select { width: auto; min-width: 210px; }
.crm-import-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.crm-action-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.enroll-result { font-size: 0.82rem; color: var(--text-mid); }
.cust-actions { margin-left: auto; display: flex; gap: 12px; }
#enroll-del-result.cust-msg { color: var(--err); }

/* ================= Kampanya ================= */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.kpi-ico { width: 46px; height: 46px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.kpi-ico svg { width: 22px; height: 22px; }
.kpi-ico.navy { background: var(--navy); color: #fff; }
.kpi-ico.gold { background: var(--gold-soft); color: var(--gold-deep); }
.kpi-ico.faint { background: var(--brand-faint); color: var(--navy); }
.kpi-ico.warm { background: rgba(241,88,34,0.12); color: var(--orange); }
.kpi-l { display: flex; flex-direction: column; gap: 2px; }
.kpi-l .stat-label { font-size: 0.66rem; }
.kpi-num { font-family: var(--font-d); font-weight: 800; font-size: 1.5rem; color: var(--navy); letter-spacing: -0.02em; }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-row { grid-template-columns: 1fr; } }
.camp-item .ci-boxes { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.ci-box { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.ci-box .stat-label { font-size: 0.62rem; }
.ci-box b { font-family: var(--font-d); font-size: 0.95rem; color: var(--navy); }
.grid-camp { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
/* Kampanya — başlık satırı, sekmeler, kart grid */
.camp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.camp-header .page-sub { margin: 4px 0 0; }
.camp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.ct-tab { padding: 12px 16px; font-weight: 600; font-size: 0.92rem; color: var(--text-mid);
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ct-tab:hover { color: var(--navy); }
.ct-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.camp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1100px) { .camp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .camp-grid { grid-template-columns: 1fr; } }
.camp-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: border-color var(--transition), box-shadow var(--transition); }
.camp-card:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-top strong { font-family: var(--font-d); font-size: 1.15rem; color: var(--navy); }
.cc-foot { display: flex; justify-content: space-between; align-items: center; }
.cc-edit { font-weight: 600; font-size: 0.85rem; color: var(--gold-deep); }
.camp-card-quick { border-style: dashed; align-items: center; justify-content: center; text-align: center; background: transparent; }
.camp-card-quick strong { font-family: var(--font-d); font-size: 1.2rem; color: var(--navy); }
.camp-card-quick .btn-secondary { pointer-events: none; }
.camp-list li { margin-bottom: 8px; }
.camp-item {
  width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  transition: border-color var(--transition), background var(--transition);
}
.camp-item:hover { border-color: var(--gold); background: var(--brand-faint); }
.camp-item .sub { width: 100%; }
.ce-head { display: grid; grid-template-columns: 2fr 100px 1fr; gap: 12px; }
.step-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; background: #fbfcfe;
}
.step-head { display: flex; justify-content: space-between; align-items: center; }
.b-toggle { font-size: 0.78rem; color: var(--text-mid); display: flex; gap: 5px; align-items: center; }
.b-toggle input { width: auto; }
.step-b { display: grid; gap: 8px; border-top: 1px dashed var(--gold); padding-top: 8px; }
.ce-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ================= Müşteri Listesi / Unibox ================= */
.cust-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.import-form { margin-top: 0; }
.import-form input[type=file] { font-size: 0.8rem; border: none; padding: 6px 0; background: none; }
.unibox-list li { margin-bottom: 8px; }
.unibox-row { display: flex; align-items: center; gap: 10px; }
.unibox-row .reply-check { width: auto; flex: none; accent-color: var(--gold-deep); }
.reply-all { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-mid); }
.reply-all input { width: auto; accent-color: var(--gold-deep); }
.reply-item {
  width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.reply-item:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.reply-item .sub { width: 100%; }
.reply-meta { font-size: 0.82rem; color: var(--text-mid); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rm-title { text-transform: uppercase; letter-spacing: -0.005em; }
#rd-draft-text { margin-top: 10px; font-family: var(--font-b); font-size: 0.88rem; }

/* Yazışma: gelen ve giden mesajlar alt alta, eskiden yeniye */
.thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 360px; overflow-y: auto; margin-bottom: 14px;
  padding: 4px 2px;
}
.msg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.msg-in { background: var(--bg); border-left: 3px solid var(--line); }
.msg-out { background: var(--brand-faint, rgba(16,76,186,.06)); border-left: 3px solid var(--gold, #2288bf); }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.msg-body { font-family: var(--font-b); font-size: 0.88rem; white-space: pre-wrap; margin: 0; }

/* ================= Huni (Satış hunisi kart dizisi) ================= */
.funnel { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 0; }
.funnel-stage {
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
  min-width: 140px; flex: 1; padding: 18px 20px; background: var(--navy); color: #fff;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.funnel-stage:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.funnel-stage:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-right: none; }
.funnel-stage .stat-num { font-size: 1.7rem; color: #fff; }
.funnel-stage .stat-label { color: rgba(255,255,255,0.6); }
/* kademeli tonlama */
.funnel-stage:nth-child(3) { background: #1c62c9; }
.funnel-stage:nth-child(5) { background: #2f7fcf; }
.funnel-stage:nth-child(7) { background: #4f9dd4; }
.funnel-won { background: var(--gold) !important; color: var(--navy-deep) !important; }
.funnel-won .stat-num { color: var(--navy-deep); }
.funnel-won .stat-label { color: rgba(7,22,48,0.6); }
.funnel-arrow { display: none; }
.funnel-card { padding-bottom: 22px; }
.funnel-card > h2 { font-family: var(--font-d); font-size: 1.35rem; font-weight: 800; text-transform: none;
  letter-spacing: -0.01em; color: var(--navy); margin-bottom: 18px; }
/* Büyük huni — daha yüksek gövde, iri rakamlar */
.funnel-lg .funnel-stage { min-height: 150px; padding: 28px 22px; gap: 10px; }
.funnel-lg .funnel-stage .stat-num { font-size: 2.6rem; }
.funnel-lg .funnel-stage .stat-label { font-size: 0.8rem; }

/* ================= Görevler & feed ================= */
.task-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.task-list label { display: flex; gap: 10px; align-items: center; cursor: pointer; flex: 1; min-width: 0; }
.task-del {
  flex: none; padding: 2px 6px; border-radius: 6px; font-size: 0.85rem; line-height: 1;
  color: var(--text-lt); opacity: 0.6; transition: opacity var(--transition), color var(--transition);
}
.task-del:hover { opacity: 1; color: var(--err); }
.task-del:disabled { opacity: 0.3; cursor: default; }
.task-list input { width: auto; accent-color: var(--gold-deep); }
.task-list .tl-at, .task-list .mono.sub { margin-left: auto; }
.feed-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.feed-list li:last-child, .task-list li:last-child { border-bottom: none; }
.task-list li.done span:not(.mono) { text-decoration: line-through; opacity: 0.5; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.feed-run { float: right; font-size: 0.75rem; }

/* ================= Görünüm anahtarı & kanban ================= */
.view-toggle { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.vt-btn { padding: 8px 16px; font-size: 0.82rem; color: var(--text-mid); font-weight: 600; }
.vt-btn.active { background: var(--navy); color: #fff; }
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban-col {
  flex: 0 0 200px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; min-height: 120px;
}
.kanban-col.drop-over { border-color: var(--gold); background: var(--accent-faint); }
.kanban-col-head {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-mid); margin-bottom: 10px; display: flex; justify-content: space-between;
}
.kanban-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; cursor: grab; font-size: 0.85rem; box-shadow: var(--shadow-sm);
}
.kanban-card:active { cursor: grabbing; }
.kanban-meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; }

/* ================= Detay & cevap modalları ================= */
.modal-wide { max-width: 820px; }
#detail-modal .modal { max-width: 1200px; }
#detail-modal .dm-dl dd { white-space: normal; word-break: break-word; }
.dm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dm-h { font-family: var(--font-b); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
        color: var(--text-mid); margin: 18px 0 10px; }
.dm-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 0.9rem; }
.dm-dl dt { color: var(--text-mid); }
.dm-dl dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-weight: 500; }
#detail-modal .dm-dl dd { text-align: right; }
.dm-enrich-panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
#dm-title { text-transform: uppercase; letter-spacing: -0.005em; }
.dm-sub { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-deep); margin-top: 5px; }
.dm-angle { font-style: italic; background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius-sm); line-height: 1.5; }
.dm-enroll { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.dm-enroll select { width: auto; min-width: 200px; }
.status-cell { white-space: nowrap; }
.status-save { margin-left: 4px; font-size: 0.95rem; animation: slidein 0.2s ease; }
/* 👁 izleme aç/kapa — kapalıyken soluk, açıkken altın */
.monitor-toggle {
  margin-left: 6px; font-size: 0.95rem; line-height: 1;
  opacity: 0.35; filter: grayscale(1); transition: opacity .15s, filter .15s;
}
.monitor-toggle:hover { opacity: 0.7; }
.monitor-toggle.on { opacity: 1; filter: none; text-shadow: 0 0 6px var(--gold-soft); }
.monitor-toggle:disabled { cursor: wait; }
@keyframes slidein { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; } }
.danger { color: var(--err); }
.danger.btn-secondary { border-color: var(--err); color: var(--err); }
.danger.btn-secondary:hover { background: var(--err); color: #fff; }
.danger:hover { background: rgba(186,26,26,0.08); color: var(--err); }
#rm-compose { font-family: var(--font-b); font-size: 0.9rem; }

/* ================= Timeline modal ================= */
.link-btn { text-align: left; color: inherit; }
.link-btn:hover strong { color: var(--navy); text-decoration: underline; }
.monitor-toggle { opacity: 0.35; font-size: 1rem; }
.monitor-toggle.mon-on { opacity: 1; background: var(--accent-faint); border-radius: var(--radius-sm); }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7, 22, 48, 0.5); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 560px; max-height: 84vh; overflow-y: auto; padding: 26px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font-family: var(--font-d); font-size: 1.15rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0; }
.timeline li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 0.86rem;
}
.timeline li:last-child { border-bottom: none; }
.tl-icon { flex: none; }
.timeline .tl-at { margin-left: auto; flex: none; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  :root { --side-w: 76px; }
  .side-logo-img, .nav-item span, .side-user div, .side-logout span:not(.mono) { display: none; }
  .brand-mark { display: grid; }
  .nav-item { justify-content: center; gap: 0; padding: 12px; }
  .side-brand { justify-content: center; padding: 4px 0 22px; }
  .side-user { justify-content: center; }
  .side-logout { justify-content: center; }
}
@media (max-width: 1024px) {
  .search-form { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-camp { grid-template-columns: 1fr; }
  .dm-grid { grid-template-columns: 1fr; }
  .ce-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stat-row { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 1.2rem; }
  main { padding: 20px 16px 60px; }
}
@media (max-width: 480px) {
  .search-form { grid-template-columns: 1fr; }
  .crm-filters { flex-direction: column; align-items: stretch; }
  .crm-filters input, .crm-filters select { width: 100%; }
}

/* Ajans imzası — sağ alt köşe, sabit */
.credit {
  position: fixed; right: 14px; bottom: 12px; z-index: 30;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  font-family: var(--font-d); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.09em;   /* metin HTML'de büyük harf — lang="tr" uppercase i'yi İ yapıyor */
  color: var(--text-lt); transition: var(--transition);
}
.credit b { font-weight: 800; color: var(--text-mid); transition: var(--transition); }
.credit:hover { border-color: var(--accent); color: var(--text-mid); box-shadow: var(--shadow-sm); }
.credit:hover b { color: var(--navy); }
.credit::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex: none;
}
@media (max-width: 760px) {
  .credit { right: 10px; bottom: 8px; font-size: 0.56rem; padding: 4px 9px; }
  body:not(.login-body) main { padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Kullanıcı satırı düzenleme modu */
.table tr.editing td { padding: 8px 12px; }
.table tr.editing input, .table tr.editing select { width: 100%; padding: 7px 9px; font-size: 0.85rem; }
