/* =====================================================================
   E-Posta Pazarlama — Yonetim Arayuzu Tasarim Sistemi
   Elle yazilmis, Hostinger'da bagimsiz calisir (Tailwind gerektirmez).
   ===================================================================== */

:root {
  /* Yuzeyler */
  --bg:          #F5F7FA;
  --surface:     #FFFFFF;
  --surface-2:   #FBFCFE;

  /* Metin */
  --ink:         #0F172A;
  --ink-soft:    #334155;
  --muted:       #64748B;
  --border:      #E6EAF0;
  --border-2:    #EEF1F6;

  /* Marka */
  --primary:     #4F46E5;
  --primary-600: #4338CA;
  --primary-050: #EEF0FF;
  --ring:        rgba(79,70,229,.28);

  /* Kenar cubugu (koyu murekkep) */
  --sidebar:      #0E1525;
  --sidebar-2:    #131C31;
  --sidebar-soft: #8B93A6;
  --sidebar-dim:  #5B6478;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active: rgba(99,102,241,.16);

  /* Anlamsal — e-posta durumlari */
  --ok:     #059669;  --ok-bg:     #E7F6EF;   /* teslim */
  --info:   #0EA5E9;  --info-bg:   #E4F4FD;   /* acilma */
  --warn:   #D97706;  --warn-bg:   #FBF0DD;   /* kuyruk */
  --danger: #E11D48;  --danger-bg: #FCE7EC;   /* sekme/hata */
  --click:  #7C3AED;  --click-bg:  #F1EAFE;   /* tiklama */

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow:    0 4px 16px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
  --radius:    12px;
  --radius-sm: 8px;

  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
.material-symbols-rounded { font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; }

/* ===================== DUZEN ===================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px; flex: 0 0 264px;
  background: var(--sidebar);
  background-image: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: #fff; position: fixed; inset: 0 auto 0 0; height: 100vh;
  display: flex; flex-direction: column; z-index: 40;
}
.side-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.4);
}
.side-brand .mark .material-symbols-rounded { font-size: 20px; }
.side-brand b { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.side-brand span { display: block; font-size: 11px; color: var(--sidebar-dim); letter-spacing: .02em; }

.side-nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 6px; }

.nav-group { margin-top: 16px; }
.nav-group:first-child { margin-top: 2px; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--sidebar-dim); font-weight: 600; padding: 0 12px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; color: var(--sidebar-soft);
  font-size: 13.5px; font-weight: 500; position: relative;
  transition: background .13s, color .13s;
}
.nav-item .material-symbols-rounded { font-size: 20px; }
.nav-item:hover { background: var(--sidebar-hover); color: #EAECF2; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item.is-disabled { color: var(--sidebar-dim); cursor: default; }
.nav-item.is-disabled:hover { background: transparent; }
.nav-item .soon {
  margin-left: auto; font-size: 9.5px; font-weight: 600; letter-spacing: .03em;
  color: var(--sidebar-dim); border: 1px solid rgba(255,255,255,.12);
  padding: 1px 6px; border-radius: 20px; text-transform: uppercase;
}

/* ===================== ANA ALAN ===================== */
.main { flex: 1; margin-left: 264px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: rgba(255,255,255,.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
}
.topbar h1 { font-size: 17px; }
.topbar .crumb { font-size: 12px; color: var(--muted); font-family: var(--font-body); font-weight: 500; }
.topbar-spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; color: var(--ink-soft);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.burger { display: none; }

/* Kullanici menusu */
.usermenu { position: relative; }
.usermenu-btn {
  display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px;
  border-radius: 30px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: linear-gradient(135deg, var(--primary), #8B5CF6); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600; font-family: var(--font-display);
}
.usermenu-btn .who { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.usermenu-btn .who small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.usermenu-pop.open { display: block; }
.usermenu-pop .head { padding: 9px 11px; border-bottom: 1px solid var(--border-2); margin-bottom: 5px; }
.usermenu-pop .head b { font-size: 13px; }
.usermenu-pop .head span { display: block; font-size: 11.5px; color: var(--muted); }
.menu-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px;
  font-size: 13px; color: var(--ink-soft); width: 100%; background: none; border: 0;
  cursor: pointer; text-align: left; font-family: var(--font-body);
}
.menu-link:hover { background: var(--surface-2); }
.menu-link.danger { color: var(--danger); }
.menu-link .material-symbols-rounded { font-size: 19px; }

.content { padding: 26px; max-width: 1240px; width: 100%; }
.page-intro { margin-bottom: 20px; }
.page-intro p { color: var(--muted); margin: 5px 0 0; font-size: 13.5px; }

/* ===================== KARTLAR ===================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-2);
}
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 20px; }
.card-head .spacer { flex: 1; }

/* Istatistik kartlari */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px;
}
.stat .ico .material-symbols-rounded { font-size: 22px; }
.stat .num { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.stat .lbl { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.stat.-primary .ico { background: var(--primary-050); color: var(--primary); }
.stat.-ok .ico { background: var(--ok-bg); color: var(--ok); }
.stat.-info .ico { background: var(--info-bg); color: var(--info); }
.stat.-warn .ico { background: var(--warn-bg); color: var(--warn); }
.stat.-click .ico { background: var(--click-bg); color: var(--click); }

/* ===================== BUTONLAR ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  font-family: var(--font-body); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .13s, border-color .13s, box-shadow .13s; line-height: 1;
}
.btn .material-symbols-rounded { font-size: 19px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.25); }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: var(--surface); color: var(--ink-soft); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===================== FORMLAR ===================== */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.label .req { color: var(--danger); }
.input, .select, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-family: var(--font-body); color: var(--ink);
  background: var(--surface); transition: border-color .13s, box-shadow .13s;
}
textarea.input { height: auto; padding: 11px 13px; resize: vertical; min-height: 90px; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3.5px var(--ring);
}
.input.has-error { border-color: var(--danger); }
.help { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.err-msg { font-size: 12px; color: var(--danger); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.err-msg .material-symbols-rounded { font-size: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-2); }

/* Onay kutulari (rol/yetki secimi) */
.check {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .12s, background .12s;
}
.check:hover { background: var(--surface-2); }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--primary); }
.check .t { font-size: 13px; font-weight: 600; color: var(--ink); }
.check .d { font-size: 11.5px; color: var(--muted); }
.check.-on { border-color: var(--primary); background: var(--primary-050); }
.perm-module { margin-bottom: 20px; }
.perm-module > .mh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.perm-module > .mh b { font-size: 13px; text-transform: capitalize; }
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* ===================== TABLOLAR ===================== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap;
}
table.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .u-name { font-weight: 600; color: var(--ink); }
.tbl .u-mail { color: var(--muted); font-size: 12.5px; }
.row-avatar { display: flex; align-items: center; gap: 11px; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* Rozetler / durum pill'leri */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 30px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok     { background: var(--ok-bg);     color: var(--ok); }
.pill-info   { background: var(--info-bg);   color: var(--info); }
.pill-warn   { background: var(--warn-bg);   color: var(--warn); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-click  { background: var(--click-bg);  color: var(--click); }
.pill-muted  { background: #EEF1F6; color: var(--muted); }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  background: var(--primary-050); color: var(--primary-600); margin: 2px 3px 2px 0;
}
.tag.-sys { background: #EEF1F6; color: var(--ink-soft); }

/* Bos durum */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .material-symbols-rounded { font-size: 42px; color: var(--border); }
.empty h4 { margin: 12px 0 4px; color: var(--ink-soft); font-size: 15px; }
.empty p { font-size: 13px; margin: 0 0 16px; }

/* Flash mesajlari */
.flash-stack { position: fixed; top: 74px; right: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: 340px; max-width: calc(100vw - 32px); }
.flash {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-radius: 11px;
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  border-left: 3px solid var(--muted); font-size: 13.5px; animation: flash-in .25s ease;
}
.flash .material-symbols-rounded { font-size: 20px; }
.flash.-success { border-left-color: var(--ok); }
.flash.-success .material-symbols-rounded { color: var(--ok); }
.flash.-error { border-left-color: var(--danger); }
.flash.-error .material-symbols-rounded { color: var(--danger); }
.flash.-info { border-left-color: var(--info); }
.flash.-info .material-symbols-rounded { color: var(--info); }
.flash .x { margin-left: auto; color: var(--muted); cursor: pointer; background: none; border: 0; }
@keyframes flash-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* Uyari bandi */
.notice {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: 11px; font-size: 13px;
  background: var(--info-bg); border: 1px solid #BEE6FA; color: #0B5F86; margin-bottom: 18px;
}
.notice .material-symbols-rounded { font-size: 20px; flex: 0 0 auto; }
.notice.-warn { background: var(--warn-bg); border-color: #F1D9AE; color: #92600C; }

/* ===================== GIRIS / AUTH ===================== */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-brand {
  background: var(--sidebar); background-image: radial-gradient(120% 90% at 15% 10%, #1B2540 0%, var(--sidebar) 55%);
  color: #fff; position: relative; overflow: hidden; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand .b-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.auth-brand .b-top .mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), #8B5CF6); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(79,70,229,.5);
}
.auth-brand .b-top b { font-family: var(--font-display); font-size: 17px; }
.auth-brand .b-mid { position: relative; z-index: 2; max-width: 380px; }
.auth-brand .b-mid h2 { font-size: 30px; line-height: 1.18; letter-spacing: -.02em; }
.auth-brand .b-mid p { color: #A9B2C7; font-size: 14.5px; margin-top: 14px; line-height: 1.6; }
.auth-brand .b-foot { position: relative; z-index: 2; font-size: 12px; color: var(--sidebar-dim); }

/* Imza: gonderim sinyali (yayilan halkalar + yol boyunca giden nokta) */
.signal { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.signal .rings {
  position: absolute; right: -80px; top: 50%; width: 460px; height: 460px; transform: translateY(-50%);
}
.signal .rings span {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1px solid rgba(139,146,166,.16);
}
.signal .rings span:nth-child(1) { width: 140px; height: 140px; }
.signal .rings span:nth-child(2) { width: 260px; height: 260px; }
.signal .rings span:nth-child(3) { width: 380px; height: 380px; }
.signal .rings span:nth-child(4) { width: 460px; height: 460px; }
.signal .core {
  position: absolute; right: 143px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  border-radius: 50%; background: linear-gradient(135deg, var(--primary), #8B5CF6);
  box-shadow: 0 0 24px rgba(99,102,241,.9);
}
.signal .pulse {
  position: absolute; right: 133px; top: 50%; width: 40px; height: 40px; transform: translateY(-50%);
  border-radius: 50%; border: 2px solid rgba(99,102,241,.7); animation: ripple 2.8s ease-out infinite;
}
.signal .pulse.d2 { animation-delay: .93s; }
.signal .pulse.d3 { animation-delay: 1.86s; }
@keyframes ripple {
  0%   { transform: translateY(-50%) scale(.5); opacity: .8; }
  100% { transform: translateY(-50%) scale(9); opacity: 0; }
}

.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--surface); }
.auth-card { width: 100%; max-width: 384px; }
.auth-card > h1 { font-size: 23px; letter-spacing: -.02em; }
.auth-card > .lede { color: var(--muted); font-size: 13.5px; margin: 7px 0 26px; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; }
.auth-alt a { color: var(--primary); font-weight: 600; }
.field-link { float: right; font-size: 12px; color: var(--primary); font-weight: 600; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ===================== DUYARLI ===================== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; opacity: 0; visibility: hidden; transition: opacity .2s; }
  .backdrop.show { opacity: 1; visibility: visible; }
}
@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .form-row, .perm-grid { grid-template-columns: 1fr; }
  .usermenu-btn .who { display: none; }
  .content { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .signal .pulse { animation: none; }
  * { transition: none !important; }
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===================== MODÜL 2: KİŞİLER ===================== */
/* Araç/filtre çubuğu */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search .material-symbols-rounded { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; }
.toolbar .search input { width: 100%; height: 40px; padding: 0 12px 0 40px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; background: var(--surface); font-family: var(--font-body); }
.toolbar .search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3.5px var(--ring); }
.toolbar select.mini { height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: var(--surface); color: var(--ink-soft); font-family: var(--font-body); cursor: pointer; }
.toolbar .grow { flex: 1; }

/* Sayfalama */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border-2); flex-wrap: wrap; }
.pg-info { font-size: 12.5px; color: var(--muted); }
.pg-links { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-soft); background: var(--surface); font-weight: 600; }
.pg:hover { background: var(--surface-2); }
.pg.is-current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg .material-symbols-rounded { font-size: 18px; }
.pg-gap { color: var(--muted); padding: 0 2px; }

/* Tablo seçim kutuları + toplu işlem barı */
.tbl .cb { width: 16px; height: 16px; accent-color: var(--primary); }
.bulk-bar { display: none; align-items: center; gap: 12px; padding: 11px 16px; background: var(--primary-050); border: 1px solid #D9DCFB; border-radius: 10px; margin-bottom: 14px; }
.bulk-bar.show { display: flex; }
.bulk-bar .cnt { font-weight: 600; font-size: 13px; color: var(--primary-600); }
.bulk-bar .sp { flex: 1; }
.bulk-bar select { height: 34px; border-radius: 8px; border: 1px solid var(--border); padding: 0 10px; font-family: var(--font-body); font-size: 13px; }

/* Etiket renk noktası */
.tag-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatches label { width: 30px; height: 30px; border-radius: 8px; cursor: pointer; position: relative; border: 2px solid transparent; }
.color-swatches input { position: absolute; opacity: 0; }
.color-swatches input:checked + span { position: absolute; inset: 0; border-radius: 6px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }

/* İçe aktarma */
.dropzone { border: 2px dashed var(--border); border-radius: 14px; padding: 40px 24px; text-align: center; background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-050); }
.dropzone .material-symbols-rounded { font-size: 46px; color: var(--primary); }
.dropzone h4 { margin: 12px 0 4px; font-size: 15px; }
.dropzone p { color: var(--muted); font-size: 13px; margin: 0; }
.dropzone .fname { margin-top: 12px; font-weight: 600; color: var(--ink); font-family: var(--font-mono); font-size: 13px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-inline { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.field-inline input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
@media (max-width: 760px) { .opt-grid { grid-template-columns: 1fr; } }

/* ===================== MODÜL 3: LİSTE & SEGMENT ===================== */
.seg-match { display: flex; gap: 10px; flex-wrap: wrap; }
.seg-match .check { flex: 1; min-width: 200px; }

.rule-list { display: flex; flex-direction: column; gap: 10px; }
.rule-row { display: grid; grid-template-columns: 190px 160px 1fr 40px; gap: 10px; align-items: center; padding: 10px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; }
.rule-row .select, .rule-row .input { height: 40px; }
.rv-cell { display: flex; align-items: center; }
.rv-cell .select, .rv-cell .input { width: 100%; }
.rv-note { color: var(--muted); font-size: 12.5px; font-style: italic; padding-left: 4px; }
.rrm { color: var(--danger); justify-self: center; }
@media (max-width: 720px) { .rule-row { grid-template-columns: 1fr 1fr; } .rule-row .rv-cell { grid-column: 1 / -1; } .rrm { grid-column: 1 / -1; justify-self: end; } }

.preview-box { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--primary-050); }
.pv-count { font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--primary-600); }
.pv-count .material-symbols-rounded { font-size: 20px; }
.pv-count b { font-size: 20px; font-family: var(--font-head); }
.pv-sample { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

.rule-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 10px; width: fit-content; font-size: 13.5px; }
.rule-pill .rf { font-weight: 600; color: var(--ink); }
.rule-pill .ro { color: var(--muted); }
.rule-pill .rv { font-weight: 600; color: var(--primary-600); background: var(--primary-050); padding: 2px 8px; border-radius: 6px; }

/* ===================== MODÜL 4: ŞABLONLAR ===================== */
.var-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { font-family: var(--font-mono); font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--primary-600); cursor: pointer; transition: background .12s, border-color .12s; }
.var-chip:hover { background: var(--primary-050); border-color: var(--primary); }
.code-area { font-family: var(--font-mono); font-size: 13px; line-height: 1.6; white-space: pre; overflow-wrap: normal; overflow-x: auto; tab-size: 2; }
.preview-subject { font-weight: 600; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 10px; margin-bottom: 12px; font-size: 13.5px; }
.preview-frame { width: 100%; min-height: 520px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 999px; font-size: 13px; font-weight: 500; }
.cat-chip .cnt { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: 11.5px; color: var(--muted); }
.cat-chip .x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.cat-chip .x:hover { color: var(--danger); }

/* ===================== MODÜL 5: KAMPANYALAR ===================== */
.section-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 14px; }
.section-label .material-symbols-rounded { font-size: 19px; color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border-2); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.recipient-count { margin-top: 14px; padding: 12px 14px; background: var(--primary-050); border: 1px solid #D9DCFB; border-radius: 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--primary-600); }
.recipient-count b { font-family: var(--font-head); font-size: 18px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.checklist li .material-symbols-rounded { font-size: 20px; }
.checklist li.ok { color: var(--ink); } .checklist li.ok .material-symbols-rounded { color: var(--success); }
.checklist li.no { color: var(--muted); } .checklist li.no .material-symbols-rounded { color: var(--border); }

/* ===================== MODÜL 6: KUYRUK & GÖNDERİM ===================== */
.progress { height: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--primary), #7C83F7); border-radius: 999px; transition: width .4s ease; }
.progress-wrap { margin-bottom: 16px; }
.progress-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; }
.progress-legend .lg { color: var(--muted); } .progress-legend .lg b { color: var(--ink); }
.progress-legend .lg.ok b { color: var(--success); }
.progress-legend .lg.err b { color: var(--danger); }
.or-sep { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0; position: relative; }
.or-sep::before, .or-sep::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border-2); }
.or-sep::before { left: 0; } .or-sep::after { right: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; }
.stat-card .sv { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1; }
.stat-card .sl { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
