/* ============================================================
   BambuMail arayuz temasi v2
   Kimlik: derin mor (marka) + bambu filizi yesili (ikincil vurgu)
   + sicak tas zemin. Basliklar: Sora, govde: Figtree.
   Sinif adlari v1 ile birebir aynidir (JS ve mobile.css bagimli).
   ============================================================ */

/* ---------------------------------------------------- YAZI TIPLERI */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/figtree-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/figtree-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/figtree-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/figtree-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/figtree-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/figtree-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/figtree-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/figtree-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/sora-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/sora-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/sora-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/sora-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* --------------------------------------------------------- TOKENLAR */
:root {
  --bg: #f3f1ec;              /* sicak tas zemin */
  --bg-2: #fdfcfa;            /* sidebar ve girdi zemini */
  --panel: #ffffff;
  --panel-2: #f4f1ea;
  --line: #e5e0d5;
  --line-soft: #eeeae1;
  --text: #241d33;
  --text-2: #5c5372;
  --muted: #96909f;
  --accent: #6d28d9;
  --accent-2: #581cb4;        /* hover / vurgulu ton */
  --accent-soft: #8b5cf6;     /* degrade ucu, grafik dolgular */
  --accent-dim: rgba(109, 40, 217, .08);
  --sprout: #2f9e5f;          /* bambu filizi - basari, canlilik */
  --sprout-deep: #1e7a47;     /* filiz metin tonu */
  --sprout-dim: rgba(47, 158, 95, .12);
  --danger: #cf3b57;
  --warn: #a8741a;
  --info: #3465d0;
  --radius: 14px;
  --radius-s: 9px;
  --font-body: 'Figtree', 'Segoe UI', -apple-system, system-ui, sans-serif;
  --font-display: 'Sora', 'Figtree', 'Segoe UI', sans-serif;
  --sh-1: 0 1px 2px rgba(48, 36, 74, .04), 0 4px 14px rgba(48, 36, 74, .05);
  --sh-2: 0 2px 6px rgba(48, 36, 74, .07), 0 10px 28px rgba(48, 36, 74, .12);
  --sh-3: 0 28px 70px rgba(34, 20, 66, .26);
  --grad-accent: linear-gradient(140deg, #7c3aed, #5b1fc4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8d2c6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c3bbae; }
::selection { background: rgba(124, 58, 237, .18); }

#app { display: flex; height: 100vh; }

/* ------------------------------------------------------------ SIDEBAR */
.sidebar {
  width: 232px; flex: 0 0 232px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}

.brand { display: flex; flex-direction: column; gap: 9px; padding: 18px 16px 14px; }
.brand-logo {
  border-radius: 14px; padding: 14px 16px;
  background: var(--grad-accent);
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(109, 40, 217, .28);
}
.brand-logo img { width: 100%; max-width: 150px; height: auto; display: block; }
.brand-sub { font-size: 11px; color: var(--muted); text-align: center; letter-spacing: .4px; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; text-align: left;
  padding: 9.5px 12px; border-radius: 10px;
  color: var(--text-2); cursor: pointer; transition: .13s;
  font-weight: 500;
}
.nav-item:hover { background: rgba(109, 40, 217, .05); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 700; }
/* Imza: aktif ogenin solunda mor -> filiz "bambu centigi" */
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3.5px; border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-soft), var(--sprout));
}
.nav-item .ico { width: 16px; text-align: center; opacity: .85; font-size: 13px; }
.badge {
  margin-left: auto; background: var(--panel-2); color: var(--text-2);
  border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .badge { background: rgba(109, 40, 217, .14); color: var(--accent); }

.side-foot { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.quota-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.quota-row b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.quota-bar { height: 5px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); transition: width .3s; border-radius: 4px; }
.side-status { margin-top: 10px; font-size: 11.5px; color: var(--muted); min-height: 16px; }
.side-status.busy { color: var(--accent); }

/* ------------------------------------------------------------ CONTENT */
.content { flex: 1; overflow-y: auto; padding: 0 28px 44px; }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } }

.view-head {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 0 16px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 72%, transparent);
}
.view-head h1 {
  margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.4px;
  font-family: var(--font-display);
}
.head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ BUTTONS */
.btn {
  background: var(--panel); border: 1px solid var(--line);
  padding: 7.5px 15px; border-radius: var(--radius-s);
  cursor: pointer; transition: .15s; white-space: nowrap; font-size: 13px;
  color: var(--text-2); font-weight: 600;
  box-shadow: 0 1px 2px rgba(48, 36, 74, .05);
}
.btn:hover:not(:disabled) { border-color: #cfc7b9; color: var(--text); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(48, 36, 74, .09); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.primary {
  background: var(--grad-accent); border-color: transparent; color: #ffffff; font-weight: 700;
  box-shadow: 0 3px 12px rgba(109, 40, 217, .32);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); color: #ffffff; box-shadow: 0 5px 18px rgba(109, 40, 217, .40); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--danger); border-color: rgba(207, 59, 87, .32); }
.btn.danger:hover:not(:disabled) { background: rgba(207, 59, 87, .07); color: var(--danger); }
.btn.small { padding: 4.5px 11px; font-size: 12px; }

/* ------------------------------------------------------------ PANELS */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  box-shadow: var(--sh-1);
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
.panel-head h2 {
  margin: 0; font-size: 13.5px; font-weight: 700; color: var(--text);
  letter-spacing: -.1px; text-transform: none;
}
.panel-head .btn, .panel-head .inline { margin-left: auto; }
.panel-body { padding: 18px; }
.panel-body.scroll-y { max-height: 320px; overflow-y: auto; }
.panel-body.list { padding: 8px; max-height: 560px; overflow-y: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-side { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 16px; }

/* ------------------------------------------------------------ CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px;
  box-shadow: var(--sh-1);
}
.card .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.card .v { font-size: 25px; font-weight: 700; margin-top: 6px; letter-spacing: -.6px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.card .s { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.card.accent .v { color: var(--accent); }
.card.warn .v { color: var(--warn); }
.card.danger .v { color: var(--danger); }
.card.info .v { color: var(--info); }

/* ------------------------------------------------------------ FIELDS */
.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; font-weight: 600; }
.field > span small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea, .filterbar input, .filterbar select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 8px 11px; outline: none; transition: .13s;
  color: var(--text);
}
.field textarea { resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus,
.filterbar input:focus, .filterbar select:focus {
  border-color: var(--accent); background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(109, 40, 217, .12);
}
.field-row { display: flex; gap: 11px; }
.field-row .field { flex: 1; }
.field.w-small, .field-row .field.w-small { flex: 0 0 120px; }

.check { display: flex; align-items: center; gap: 8px; margin: 9px 0; font-size: 12.8px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline-field { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.inline-field input { width: 62px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }

.hint { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 10px 0 0; }
.hint b { color: var(--text-2); font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }

/* ------------------------------------------------------- CHIP PICKER */
.chip-picker {
  display: flex; flex-wrap: wrap; gap: 5px;
  max-height: 188px; overflow-y: auto; padding: 9px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s);
}
.chip {
  border: 1px solid var(--line); background: var(--panel);
  padding: 3.5px 10px; border-radius: 20px; font-size: 12px;
  cursor: pointer; color: var(--text-2); transition: .12s; user-select: none;
}
.chip:hover { border-color: #c8b8ec; color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 600; }

/* ------------------------------------------------------------ TABLE */
.filterbar {
  display: flex; gap: 9px; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap;
}
.filterbar input[type=search] { width: 250px; }
.filterbar select { width: auto; min-width: 140px; }
.filterbar input[type=date] { width: 138px; }

.tablewrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 210px);
  box-shadow: var(--sh-1);
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel); text-align: left; padding: 10px 12px;
  font-size: 10.8px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .55px;
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
.table thead th[data-sort] { cursor: pointer; user-select: none; }
.table thead th[data-sort]:hover { color: var(--accent); }
.table tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #f8f5ef; }
.table tbody tr.sel { background: var(--accent-dim); }
.table .w-check { width: 34px; }
.table .w-act { width: 72px; text-align: right; }
.table input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
.cell-strong { font-weight: 600; }
.cell-sub { font-size: 11px; color: var(--muted); }
.cell-link { color: var(--accent); text-decoration: none; cursor: pointer; }
.cell-link:hover { text-decoration: underline; }
.row-act { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 5px; border-radius: 6px; font-size: 13px; }
.row-act:hover { background: var(--panel-2); color: var(--text); }
.row-act.del:hover { color: var(--danger); }

/* Durum ikonu: renkli daire icinde sembol - uzaktan okunur */
.st { display: inline-flex; align-items: center; gap: 7px; }
.st-ico {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; color: #ffffff; line-height: 1;
  box-shadow: 0 2px 5px rgba(48, 36, 74, .18);
}
.st-ico.new { background: #b6aec6; }
.st-ico.queued { background: var(--info); }
.st-ico.sent { background: var(--accent-soft); }
.st-ico.replied { background: var(--sprout); }
.st-ico.bounced { background: var(--danger); }
.st-ico.failed { background: var(--danger); }
.st-ico.unsubscribed { background: #d08a1d; }

.pill { display: inline-block; padding: 2.5px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill.new { background: var(--panel-2); color: var(--text-2); }
.pill.queued { background: rgba(52, 101, 208, .10); color: var(--info); }
.pill.sent { background: var(--accent-dim); color: var(--accent); }
.pill.replied { background: var(--sprout-dim); color: var(--sprout-deep); }
.pill.bounced, .pill.failed { background: rgba(207, 59, 87, .10); color: var(--danger); }
.pill.unsubscribed { background: rgba(168, 116, 26, .12); color: var(--warn); }
.pill.noemail { background: #f6efe0; color: var(--warn); }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty.small { padding: 20px; font-size: 12.3px; }
.empty b { color: var(--text-2); }

/* ---------------------------------------------------- HIZ SECICI */
.speed-picker { display: flex; gap: 8px; }
.speed-opt {
  flex: 1; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 9px 12px; transition: .13s;
}
.speed-opt b { display: block; font-size: 12.8px; color: var(--text); }
.speed-opt small { display: block; font-size: 10.8px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.speed-opt:hover { border-color: #c8b8ec; }
.speed-opt.on { border-color: var(--accent); background: var(--accent-dim); }
.speed-opt.on b { color: var(--accent); }

/* ------------------------------------------------- ARAMA ILERLEMESI */
.search-progress {
  padding: 13px 18px 11px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.sp-top { display: flex; align-items: center; gap: 9px; font-size: 12.8px; color: var(--text-2); }
.sp-top b { color: var(--accent); font-size: 13px; }
.sp-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: sp-pulse 1.1s ease-in-out infinite;
}
.sp-dot.done { animation: none; background: var(--sprout); }
@keyframes sp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}
.sp-bar {
  position: relative; height: 8px; margin: 9px 0 7px;
  background: var(--panel-2); border-radius: 5px; overflow: hidden;
}
.sp-bar i#sp-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  border-radius: 5px; transition: width .5s ease;
}
/* Sonuc beklerken bar uzerinde kayan parilti - "calisiyor" hissi */
.sp-bar.indet::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 34%;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, .30), transparent);
  animation: sp-slide 1.4s linear infinite;
}
@keyframes sp-slide {
  from { left: -34%; }
  to { left: 100%; }
}
.sp-meta { display: flex; justify-content: space-between; font-size: 11.4px; color: var(--muted); }

/* ------------------------------------------------------------- LOG */
.log {
  font-family: "Cascadia Mono", Consolas, monospace; font-size: 11.8px;
  max-height: 460px; overflow-y: auto; line-height: 1.75;
}
.log-line { padding: 1px 0; color: var(--text-2); display: flex; gap: 8px; }
.log-line .t { color: #b6aec6; flex: 0 0 54px; }
.log-line.ok { color: var(--sprout-deep); }
.log-line.err { color: var(--danger); }
.log-line.warn { color: var(--warn); }
.log-line.info { color: var(--accent); }

.tag {
  margin-left: auto; font-size: 11px; padding: 2.5px 10px; border-radius: 20px;
  background: var(--panel-2); color: var(--text-2); font-weight: 700;
}
.tag.busy { background: var(--accent-dim); color: var(--accent); }
.tag.err { background: rgba(207, 59, 87, .10); color: var(--danger); }

/* --------------------------------------------------- TEMPLATE LIST */
.tpl-item {
  padding: 10px 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 3px; transition: .12s;
}
.tpl-item:hover { background: var(--panel-2); }
.tpl-item.on { background: var(--accent-dim); border-color: rgba(109, 40, 217, .25); }
.tpl-item .n { font-weight: 600; font-size: 13px; }
.tpl-item .m { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.tpl-item .del { float: right; }

.varbar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.varbar .chip { font-family: "Cascadia Mono", Consolas, monospace; }

/* ------------------------------------------------------------ MODAL */
.modal-back {
  position: fixed; inset: 0; background: rgba(30, 20, 55, .40);
  display: none; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(4px);
}
.modal-back.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; width: 620px; max-width: 94vw;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--sh-3);
  animation: pop .18s ease;
}
.modal.wide { width: 900px; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 15.5px; font-weight: 700; font-family: var(--font-display); letter-spacing: -.2px; }
.modal-head .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 7px; }
.modal-head .x:hover { background: var(--panel-2); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; gap: 9px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); }

.preview-top { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.preview-top .field { flex: 1; min-width: 210px; margin: 0; }
.attach-row { display: flex; align-items: center; gap: 9px; }

.preview-summary {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; margin-bottom: 12px; font-size: 12.7px; line-height: 1.7;
}
.preview-summary b { color: var(--accent); }
.preview-summary .bad { color: var(--warn); }

.preview-pager { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.preview-mail { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; }
.pm-row { font-size: 12.7px; margin-bottom: 6px; color: var(--text-2); }
.pm-row b { color: var(--muted); font-weight: 600; margin-right: 5px; }
.pm-body {
  margin: 10px 0 0; padding: 14px; background: #ffffff; border: 1px solid var(--line-soft); border-radius: 9px;
  white-space: pre-wrap; word-break: break-word; font-family: var(--font-body);
  font-size: 13.3px; line-height: 1.62; max-height: 320px; overflow-y: auto; color: var(--text);
}
.blocked-details { margin-top: 12px; font-size: 12px; color: var(--text-2); }
.blocked-details summary { cursor: pointer; color: var(--warn); padding: 5px 0; }
.blocked-details div { padding: 7px 0 0; line-height: 1.75; }

.alt-emails { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.alt-emails .ae { color: var(--accent); cursor: pointer; text-decoration: underline; margin-right: 9px; }

.ai-result { margin-top: 12px; }
.ai-subject {
  display: block; width: 100%; text-align: left; margin-bottom: 5px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 11px; cursor: pointer; font-size: 12.7px; transition: .12s;
}
.ai-subject:hover { border-color: var(--accent); background: var(--accent-dim); }
.ai-body-prev {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; white-space: pre-wrap; font-size: 12.4px; max-height: 220px;
  overflow-y: auto; margin-top: 8px; line-height: 1.6;
}

.testresult { font-size: 12px; margin-top: 8px; min-height: 17px; line-height: 1.6; }
.testresult.ok { color: var(--sprout-deep); }
.testresult.err { color: var(--danger); }

.bl-item { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12.4px; }
.bl-item .r { color: var(--muted); font-size: 11px; }
.bl-item button { margin-left: auto; }

.ck-item { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.7px; }
.ck-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: 0 0 8px; }
.ck-item.done .dot { background: var(--sprout); }
.ck-item .lbl { color: var(--text-2); }
.ck-item.done .lbl { color: var(--text); }
.ck-item .go { margin-left: auto; }

.cb-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.7px; }
.cb-row .flag { width: 34px; font-weight: 700; color: var(--text-2); }
.cb-row .bar { flex: 1; height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.cb-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); border-radius: 3px; }
.cb-row .n { width: 128px; text-align: right; color: var(--muted); font-size: 11.5px; }

.q-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.6px; }
.q-row .i { color: var(--muted); width: 26px; font-variant-numeric: tabular-nums; }
.q-row .c { flex: 1; }
.q-row .e { color: var(--muted); font-size: 11.5px; }

.fu-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.6px; }
.fu-row input { accent-color: var(--accent); }
.fu-row .c { flex: 1; }
.fu-row .d { color: var(--muted); font-size: 11.5px; }

/* ----------------------------------------------------------- TOASTS */
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 9px; z-index: 200; }
.toast {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 12px 16px; border-radius: 12px; font-size: 12.9px;
  min-width: 260px; max-width: 420px; box-shadow: var(--sh-2);
  animation: slide .22s ease;
}
@keyframes slide { from { opacity: 0; transform: translateX(18px); } }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast b { display: block; margin-bottom: 2px; }

.blocker {
  position: fixed; inset: 0; background: rgba(243, 241, 236, .74); z-index: 300;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 15px;
  backdrop-filter: blur(3px); font-size: 13px; color: var(--text-2);
}
.blocker.on { display: flex; }
.spinner {
  width: 34px; height: 34px; border: 3px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1240px) {
  .grid-2, .grid-side { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------- CEVAP KUTUSU */
.inbox-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.ib-item {
  padding: 11px 14px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 3px; transition: .12s;
}
.ib-item:hover { background: var(--panel-2); }
.ib-item.on { background: var(--accent-dim); border-color: rgba(109, 40, 217, .25); }
.ib-item .c { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.ib-item .m { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ib-item .p { font-size: 12px; color: var(--text-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ib-bubble { border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; margin-bottom: 12px; }
.ib-bubble.out { background: var(--accent-dim); border-color: rgba(109, 40, 217, .18); }
.ib-bubble.in { background: #f1f9f2; border-color: rgba(47, 158, 95, .28); }
.ib-bubble .h { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; display: flex; gap: 8px; }
.ib-bubble .h b { color: var(--text-2); }
.ib-bubble pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-body); font-size: 13.2px; line-height: 1.6;
  max-height: 260px; overflow-y: auto;
}
.ib-replybox { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 6px; }
.ib-replybox textarea { min-height: 110px; }

/* -------------------------------------------------- FIRMA DETAY PANELI */
.drawer-back {
  position: fixed; inset: 0; background: rgba(30, 20, 55, .32);
  opacity: 0; pointer-events: none; transition: .18s; z-index: 90;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 92vw;
  background: var(--panel); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .22s ease; z-index: 95;
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(34, 20, 66, .16);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 13px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { margin: 0; font-size: 16.5px; font-weight: 700; font-family: var(--font-display); letter-spacing: -.3px; }
.drawer-head .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 7px; }
.drawer-head .x:hover { background: var(--panel-2); color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { display: flex; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line-soft); }
.dr-grid { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13px; }
.dr-grid .k { color: var(--muted); }
.dr-grid .v { color: var(--text); word-break: break-word; }
.dr-grid .v a { color: var(--accent); }
.dr-h { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.timeline { border-left: 2px solid var(--line); margin-left: 5px; padding-left: 14px; }
.tl-item { position: relative; padding: 3px 0 10px; font-size: 12.7px; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.tl-item.green::before { background: var(--sprout); }
.tl-item.red::before { background: var(--danger); }
.tl-item .t { color: var(--muted); font-size: 11px; }
.dr-mail { border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 12px; margin-bottom: 6px; font-size: 12.5px; cursor: pointer; transition: .12s; }
.dr-mail:hover { border-color: var(--accent); }
.dr-mail .s { color: var(--muted); font-size: 11px; }

/* ------------------------------------------------------ PANEL GRAFIK */
.chart-legend { margin-left: auto; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chart-legend .lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-legend .lg.sent { background: #c3aef5; }
.chart-legend .lg.rep { background: var(--sprout); }
#daily-chart svg { width: 100%; height: 120px; display: block; }

/* --------------------------------------------------------- SIHIRBAZ */
.wz-p { font-size: 13.4px; line-height: 1.6; color: var(--text-2); margin: 0 0 14px; }
.sep { border: 0; border-top: 1px solid var(--line-soft); margin: 14px 0; }

/* health satirlari */
.hl-row { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.7px; align-items: flex-start; }
.hl-row .st-ico { margin-top: 1px; }
.hl-row .k { font-weight: 700; width: 58px; flex: 0 0 58px; }
.hl-row .m { color: var(--text-2); line-height: 1.5; word-break: break-word; }

@media (max-width: 1240px) {
  .inbox-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------- INFO TOOLTIP */
.tip-i {
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 10px; font-weight: 700; font-style: italic;
  cursor: help; position: relative; margin-left: 6px; vertical-align: middle;
  text-transform: none; letter-spacing: 0; flex: 0 0 15px;
}
.tip-i:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Balon tek bir sabit (fixed) kutudur; JS konumlar. Panellerin
   overflow:hidden kirpmasindan ve z-index katmanlarindan etkilenmez. */
#tipbox {
  position: fixed; z-index: 9999; max-width: 280px;
  background: #292138; color: #f2eefa;
  border-radius: 10px; padding: 10px 13px;
  font-size: 12px; font-weight: 400; font-style: normal;
  line-height: 1.55; text-align: left; letter-spacing: .1px; text-transform: none;
  box-shadow: 0 12px 34px rgba(34, 20, 66, .40);
  opacity: 0; pointer-events: none; transition: opacity .1s;
}
#tipbox.on { opacity: 1; }

/* --------------------------------------------------- FORM GRUPLARI */
.fgroup {
  border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 13px 14px; margin-bottom: 12px; background: var(--bg-2);
}
.fgroup-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 10px;
}
.fg-no {
  width: 19px; height: 19px; border-radius: 50%; flex: 0 0 19px;
  background: var(--grad-accent); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
details.fgroup.adv > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
}
details.fgroup.adv > summary::-webkit-details-marker { display: none; }
details.fgroup.adv[open] > summary { margin-bottom: 10px; }
details.fgroup.adv > summary::after { content: '\25be'; margin-left: auto; color: var(--muted); transition: .15s; }
details.fgroup.adv[open] > summary::after { transform: rotate(180deg); }

.chip-picker.compact { max-height: 132px; }
.chip-tools { float: right; font-weight: 400; font-size: 11px; }
.chip-tools a { color: var(--accent); cursor: pointer; }
.chip-tools a:hover { text-decoration: underline; }

/* ----------------------------------------------------- GONDERIM SERIDI */
.qbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
  box-shadow: var(--sh-1);
}
.qbar .tag { margin-left: 0; }
.qbar-current { font-size: 12.8px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

details.panel.fold > summary.fold-head { cursor: pointer; list-style: none; }
details.panel.fold > summary.fold-head::-webkit-details-marker { display: none; }
details.panel.fold > summary.fold-head::after { content: '\25be'; color: var(--muted); margin-left: 8px; transition: .15s; }
details.panel.fold[open] > summary.fold-head::after { transform: rotate(180deg); }

/* --------------------------------------------------- SABLON EDITORU */
.subject-input { font-weight: 600; }
#t-body {
  font-family: var(--font-body) !important;
  font-size: 13.4px !important; line-height: 1.65 !important;
  padding: 12px !important;
}
.varbar-wrap {
  background: var(--bg-2); border: 1px dashed var(--line);
  border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 10px;
}
.varbar-title { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.tpl-item .lang-pill {
  display: inline-grid; place-items: center; min-width: 26px; height: 17px;
  background: var(--accent-dim); color: var(--accent); border-radius: 5px;
  font-size: 10px; font-weight: 700; padding: 0 4px;
}

/* ------------------------------------------------ FIRMALAR OZET SERIDI */
.lead-stats {
  display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 12px;
}
.ls-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: 6px 15px 6px 8px;
  font-size: 12.6px; color: var(--text-2); cursor: pointer; transition: .13s;
  box-shadow: 0 1px 2px rgba(48, 36, 74, .05);
}
.ls-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.ls-item.active { border-color: var(--accent); background: var(--accent-dim); }
.ls-item b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.ls-item .st-ico { width: 20px; height: 20px; flex: 0 0 20px; font-size: 11px; }

/* Grafik bari: aninda hover geri bildirimi */
#daily-chart g.bar-tip { cursor: pointer; }
#daily-chart g.bar-tip:hover rect { opacity: .72; }

/* ----------------------------------------------------- POSTA KUTUSU */
.mb-grid {
  display: grid; grid-template-columns: 210px 360px 1fr; gap: 14px;
  align-items: start; height: calc(100vh - 150px);
}
.mb-grid .panel { margin-bottom: 0; height: 100%; display: flex; flex-direction: column; }
.mb-grid .panel-body.list { flex: 1; max-height: none; }
.mb-read-panel .panel-body.mb-read { flex: 1; overflow-y: auto; }

.mb-folder {
  display: flex; align-items: center; gap: 8px;
  padding: 8.5px 11px; border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-2); margin-bottom: 2px; transition: .12s;
}
.mb-folder:hover { background: var(--panel-2); }
.mb-folder.on { background: var(--accent-dim); color: var(--accent); font-weight: 700; }
.mb-folder .cnt {
  margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 12px; padding: 0 7px; font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mb-msg {
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft); transition: background .1s;
}
.mb-msg:hover { background: var(--panel-2); }
.mb-msg.on { background: var(--accent-dim); }
.mb-msg .f { display: flex; gap: 8px; align-items: baseline; }
.mb-msg .from { font-weight: 700; font-size: 12.8px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-msg.seen .from { font-weight: 450; color: var(--text-2); }
.mb-msg .d { font-size: 10.8px; color: var(--muted); white-space: nowrap; }
.mb-msg .s { font-size: 12.4px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.mb-msg.seen .s { color: var(--muted); }
.mb-msg .dot-unread {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 5px; flex: 0 0 7px;
}
.mb-more { padding: 9px; text-align: center; border-top: 1px solid var(--line-soft); }

.mb-head-block { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 13px; }
.mb-head-block h3 { margin: 0 0 7px; font-size: 16px; font-weight: 700; font-family: var(--font-display); letter-spacing: -.3px; }
.mb-head-block .row { font-size: 12.4px; color: var(--text-2); margin: 2px 0; }
.mb-head-block .row b { color: var(--muted); font-weight: 600; margin-right: 5px; }
.mb-body-text {
  white-space: pre-wrap; word-break: break-word;
  font-size: 13.4px; line-height: 1.65;
}
.mb-html-frame { width: 100%; border: 1px solid var(--line-soft); border-radius: 9px; min-height: 320px; background: #fff; }
.mb-view-toggle { margin: 9px 0; }
.mb-attach {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; margin: 3px 5px 3px 0;
}
.mb-replybox { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 13px; }

@media (max-width: 1300px) {
  .mb-grid { grid-template-columns: 180px 300px 1fr; }
}

/* -------------------------------------------------- ZENGIN METIN EDITORU */
.rte { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg-2); }
.rte:focus-within { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3.5px rgba(109, 40, 217, .12); }
.rte-bar {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 6px 8px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2);
  border-radius: var(--radius-s) var(--radius-s) 0 0;
}
.rte-btn {
  min-width: 28px; height: 28px; border: 0; background: none; border-radius: 7px;
  cursor: pointer; font-size: 13.5px; color: var(--text-2); display: grid; place-items: center;
  padding: 0 5px;
}
.rte-btn:hover { background: rgba(109, 40, 217, .08); color: var(--text); }
.rte-btn b { font-weight: 750; }
.rte-btn i { font-style: italic; font-family: Georgia, serif; }
.rte-btn u { text-decoration: underline; }
.rte-sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; }
.rte-bar select {
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 12px; padding: 3px 5px; color: var(--text-2); cursor: pointer;
}
.rte-bar input[type=color] {
  width: 24px; height: 24px; padding: 0; border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer; background: none;
}
.rte-area {
  min-height: 190px; max-height: 380px; overflow-y: auto;
  padding: 13px 15px; outline: none;
  font-size: 13.4px; line-height: 1.65;
}
.rte-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rte-area img { max-width: 100%; }
.rte-area a { color: var(--accent); }

.attach-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 9px; font-size: 11.8px; margin: 3px 5px 0 0;
}
.attach-chip .x2 { cursor: pointer; color: var(--muted); font-weight: 700; }
.attach-chip .x2:hover { color: var(--danger); }

/* ------------------------------------------------------ SAG TIK MENUSU */
.ctx-menu {
  position: fixed; z-index: 9000; min-width: 195px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--sh-2);
  padding: 6px; display: none;
}
.ctx-menu.open { display: block; }
.ctx-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 12.9px;
  color: var(--text-2);
}
.ctx-item:hover { background: var(--accent-dim); color: var(--text); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: rgba(207, 59, 87, .08); }
.ctx-sep { height: 1px; background: var(--line-soft); margin: 4px 6px; }
.ctx-title { font-size: 10.8px; color: var(--muted); padding: 6px 12px 2px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.ctx-colors { display: flex; gap: 7px; padding: 6px 12px 8px; }
.ctx-color {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: .1s;
}
.ctx-color:hover { transform: scale(1.15); border-color: var(--text-2); }
.ctx-color.none { background: #fff; border: 2px solid var(--line); position: relative; }
.ctx-color.none::after { content: '/'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

/* Renk etiketi: satirin sol seridi */
.mb-msg { position: relative; }
.mb-msg[data-color]::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 4px; border-radius: 3px; background: var(--msg-color, transparent);
}
.mb-msg[data-color] { padding-left: 15px; }

/* --------------------------------------------------------- COKLU CC */
.cc-list { display: flex; flex-direction: column; gap: 6px; }
.cc-row { display: flex; gap: 6px; align-items: center; }
.cc-row .cc-input { flex: 1; }
.cc-row .cc-add, .cc-row .cc-del { flex: 0 0 auto; padding: 4px 11px; }

/* ----------------------------------------------------------- DASHBOARD */
.dash-head { background: var(--bg); }
.dash-head h1 { font-size: 24px; }
.dash-head .muted { margin-top: 2px; }

.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 16px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--sh-1);
  display: flex; align-items: center; gap: 14px; min-height: 94px;
}
.kpi .big {
  font-size: 27px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1;
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
}
.kpi .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .55px; font-weight: 700; }
.kpi .sub { font-size: 11.8px; color: var(--text-2); margin-top: 3px; }
.kpi .trend { font-size: 11.4px; font-weight: 700; border-radius: 20px; padding: 2.5px 9px; font-variant-numeric: tabular-nums; }
.kpi .trend.up { background: var(--sprout-dim); color: var(--sprout-deep); }
.kpi .trend.down { background: rgba(207, 59, 87, .10); color: var(--danger); }
.kpi .trend.flat { background: var(--panel-2); color: var(--muted); }
.kpi-ico {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 44px;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(140deg, rgba(124, 58, 237, .13), rgba(139, 92, 246, .07));
  color: var(--accent);
}
.kpi-donut { position: relative; width: 58px; height: 58px; flex: 0 0 58px; }
.kpi-donut svg { transform: rotate(-90deg); }
.kpi-donut .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13.5px; font-weight: 700; color: var(--accent);
  font-family: var(--font-display);
}
.kpi-bar { height: 7px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-top: 7px; }
.kpi-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); border-radius: 4px; }

.dash-mid { display: grid; grid-template-columns: 1fr 330px; gap: 16px; margin-bottom: 16px; }
.dash-bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.task-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: 11px;
  margin-bottom: 8px; cursor: pointer; transition: .13s;
}
.task-item:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateX(2px); }
.task-item .t-ico { font-size: 17px; }
.task-item .t-txt { flex: 1; font-size: 12.8px; color: var(--text-2); line-height: 1.45; }
.task-item .t-txt b { color: var(--text); }
.task-item .t-go { color: var(--accent); font-weight: 700; }
.task-done { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 12.9px; }
.task-done .big { font-size: 30px; margin-bottom: 6px; }

.funnel-row { margin-bottom: 11px; }
.funnel-top { display: flex; justify-content: space-between; font-size: 12.2px; color: var(--text-2); margin-bottom: 4px; }
.funnel-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.funnel-bar { height: 22px; border-radius: 7px; background: var(--panel-2); overflow: hidden; }
.funnel-bar i {
  display: flex; align-items: center; justify-content: flex-end;
  height: 100%; border-radius: 7px; padding-right: 8px;
  color: #fff; font-size: 11px; font-weight: 700; min-width: 30px;
  transition: width .5s ease;
}

.act-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; align-items: flex-start; }
.act-row:last-child { border-bottom: 0; }
.act-row .a-ico { width: 25px; height: 25px; border-radius: 8px; flex: 0 0 25px; display: grid; place-items: center; font-size: 12px; }
.act-row .a-ico.sent { background: var(--accent-dim); color: var(--accent); }
.act-row .a-ico.replied { background: var(--sprout-dim); color: var(--sprout-deep); }
.act-row .a-ico.bounced, .act-row .a-ico.failed { background: rgba(207, 59, 87, .10); color: var(--danger); }
.act-row .a-ico.reply-out { background: rgba(52, 101, 208, .10); color: var(--info); }
.act-row .a-txt { flex: 1; min-width: 0; }
.act-row .a-c { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row .a-d { font-size: 10.8px; color: var(--muted); }

@media (max-width: 1280px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-mid, .dash-bottom { grid-template-columns: 1fr; }
}

/* --------------------------------------------------- AYAR KATEGORILERI */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: start; }
.set-nav {
  position: sticky; top: 76px;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px;
  box-shadow: var(--sh-1);
}
.set-cat {
  display: flex; align-items: center; gap: 9px; text-align: left;
  background: none; border: 0; border-radius: 9px;
  padding: 9.5px 12px; cursor: pointer; font-size: 13px; color: var(--text-2);
  font-weight: 500; transition: .12s;
}
.set-cat:hover { background: var(--panel-2); color: var(--text); }
.set-cat.active { background: var(--accent-dim); color: var(--accent); font-weight: 700; }
.set-content { min-width: 0; }
.settings-grid .panel[data-cat] { display: none; }
.settings-grid .panel[data-cat].show { display: block; }
.set-content > .panel[data-cat] { display: none; }
.set-content > .panel[data-cat].show { display: block; }

.theme-picker { display: flex; gap: 12px; }
.theme-opt {
  flex: 0 0 150px; text-align: center; cursor: pointer;
  background: var(--bg); border: 2px solid var(--line); border-radius: 14px;
  padding: 17px 10px; transition: .13s;
}
.theme-opt .th-ico { display: block; font-size: 26px; margin-bottom: 6px; }
.theme-opt b { display: block; font-size: 13.5px; color: var(--text); }
.theme-opt small { color: var(--muted); font-size: 11px; }
.theme-opt:hover { border-color: #c8b8ec; }
.theme-opt.on { border-color: var(--accent); background: var(--accent-dim); }

.side-foot-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.side-foot-row .side-status { margin-top: 0; flex: 1; }
.app-ver { margin-top: 6px; font-size: 10.5px; color: var(--muted); opacity: .7; user-select: text; font-variant-numeric: tabular-nums; }
.theme-toggle {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px;
  width: 30px; height: 30px; cursor: pointer; font-size: 14px;
  display: grid; place-items: center; flex: 0 0 30px; transition: .13s;
}
.theme-toggle:hover { border-color: var(--accent); }

/* --------------------------------------------------------- GECE TEMASI */
body.theme-dark {
  --bg: #141120;
  --bg-2: #191528;
  --panel: #1d1930;
  --panel-2: #272141;
  --line: #332b52;
  --line-soft: #2b2446;
  --text: #ece9f6;
  --text-2: #b2a9cd;
  --muted: #7d7599;
  --accent: #a685fa;
  --accent-2: #bfa4ff;
  --accent-soft: #8b5cf6;
  --accent-dim: rgba(166, 133, 250, .13);
  --sprout: #4ec983;
  --sprout-deep: #6fd99b;
  --sprout-dim: rgba(78, 201, 131, .13);
  --danger: #f2808f;
  --warn: #e8b654;
  --info: #7ba3f7;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .22), 0 4px 14px rgba(0, 0, 0, .18);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .30), 0 10px 28px rgba(0, 0, 0, .34);
  --sh-3: 0 28px 70px rgba(0, 0, 0, .55);
  --grad-accent: linear-gradient(140deg, #8b5cf6, #6d28d9);
}
body.theme-dark ::-webkit-scrollbar-thumb { background: #3a3160; }
body.theme-dark ::-webkit-scrollbar-thumb:hover { background: #4a3f78; }
body.theme-dark ::selection { background: rgba(166, 133, 250, .30); }
body.theme-dark .field input, body.theme-dark .field select, body.theme-dark .field textarea,
body.theme-dark .filterbar input, body.theme-dark .filterbar select,
body.theme-dark .chip-picker, body.theme-dark .inline-field input,
body.theme-dark .ai-subject, body.theme-dark .speed-opt,
body.theme-dark .rte, body.theme-dark .rte-bar select,
body.theme-dark .pm-body { background: var(--bg-2); }
body.theme-dark .field input:focus, body.theme-dark .field select:focus, body.theme-dark .field textarea:focus,
body.theme-dark .filterbar input:focus, body.theme-dark .filterbar select:focus { background: var(--bg-2); box-shadow: 0 0 0 3.5px rgba(166, 133, 250, .18); }
body.theme-dark .rte:focus-within { background: var(--bg-2); box-shadow: 0 0 0 3.5px rgba(166, 133, 250, .18); }
body.theme-dark .chip { background: var(--panel-2); }
body.theme-dark .chip:hover { border-color: #55459a; }
body.theme-dark .speed-opt:hover { border-color: #55459a; }
body.theme-dark .theme-opt:hover { border-color: #55459a; }
body.theme-dark .btn:hover:not(:disabled) { border-color: #4a3f78; }
body.theme-dark .panel-head, body.theme-dark .rte-bar,
body.theme-dark .search-progress, body.theme-dark .fgroup,
body.theme-dark .varbar-wrap { background: var(--panel-2); }
body.theme-dark .panel-head { background: transparent; }
body.theme-dark .table thead th { background: var(--panel); }
body.theme-dark .table tbody tr:hover { background: #241e3d; }
body.theme-dark .pill.new { background: var(--panel-2); color: var(--text-2); }
body.theme-dark .theme-opt { background: var(--bg-2); }
body.theme-dark .blocker { background: rgba(10, 7, 20, .72); }
body.theme-dark .ib-bubble.out { background: rgba(166, 133, 250, .12); border-color: rgba(166, 133, 250, .28); }
body.theme-dark .ib-bubble.in { background: rgba(78, 201, 131, .09); border-color: rgba(78, 201, 131, .26); }
body.theme-dark .mb-html-frame { background: #ffffff; }   /* mail icerigi okunabilir kalsin */
body.theme-dark .btn.primary { color: #ffffff; }
body.theme-dark .chip.on { color: #141022; background: var(--accent); }
body.theme-dark .brand-logo { box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
body.theme-dark .kpi-donut .track { stroke: var(--panel-2); }
body.theme-dark .funnel-bar i { color: #141022; }
body.theme-dark .kpi-ico { background: rgba(166, 133, 250, .13); }
body.theme-dark #tipbox { background: #0f0c1a; }

/* -------------------------------------------------------- SVG IKONLAR */
.ic { display: inline-grid; place-items: center; vertical-align: -2px; }
.ic svg, .ico svg { display: block; }
.nav-item .ico { display: inline-grid; place-items: center; }
.btn .ic { vertical-align: -2px; margin-right: 2px; }
.set-cat .ic { flex: 0 0 15px; }
.mb-folder .mbf-i { display: inline-grid; place-items: center; color: var(--muted); flex: 0 0 16px; }
.mb-folder.on .mbf-i { color: var(--accent); }
.ctx-item svg { flex: 0 0 14px; }
.tpl-item .m svg { vertical-align: -1px; }
.task-done .big svg { width: 30px; height: 30px; }
.rte-btn svg { display: block; }
.attach-chip svg, .mb-attach svg { vertical-align: -1px; }

/* --------------------------------------------------------- SATIS HATTI */
.pipeline {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  align-items: start; min-height: calc(100vh - 190px);
}
.pl-col {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column;
  max-height: calc(100vh - 190px);
  box-shadow: var(--sh-1);
}
.pl-col.dragover { border-color: var(--accent); background: var(--accent-dim); }
.pl-head {
  padding: 11px 13px; border-bottom: 2px solid var(--stage-color, var(--line));
  font-size: 11.4px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-2); display: flex; align-items: center; gap: 7px;
}
.pl-head .cnt { margin-left: auto; background: var(--panel-2); border-radius: 12px; padding: 0 8px; font-size: 11px; font-variant-numeric: tabular-nums; }
.pl-body { padding: 8px; overflow-y: auto; flex: 1; }
.pl-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 7px; cursor: grab; transition: .13s;
}
.pl-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(48, 36, 74, .10); transform: translateY(-1px); }
.pl-card.dragging { opacity: .45; }
.pl-card .c { font-weight: 700; font-size: 12.8px; margin-bottom: 3px; }
.pl-card .m { font-size: 11px; color: var(--muted); display: flex; gap: 7px; flex-wrap: wrap; }
.pl-card .note { font-size: 11.6px; color: var(--text-2); margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card .rem { font-size: 10.8px; color: var(--warn); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.pl-card .rem.due { color: var(--danger); font-weight: 700; }
.pl-empty { text-align: center; color: var(--muted); font-size: 11.5px; padding: 18px 6px; }

/* Firma karti modali icindeki not listesi */
.note-list { max-height: 180px; overflow-y: auto; margin-bottom: 10px; }
.note-item { border-left: 3px solid rgba(109, 40, 217, .30); padding: 5px 11px; margin-bottom: 6px; font-size: 12.5px; }
.note-item .t { font-size: 10.6px; color: var(--muted); }
.contact-links { display: flex; gap: 8px; margin-top: 6px; }
.contact-links .btn { font-size: 12px; }

@media (max-width: 1400px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------------------------ KAYITLI ALICI SECICI */
.to-row { display: flex; gap: 6px; }
.to-row input { flex: 1; }
.pick-pop {
  margin-top: 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); box-shadow: var(--sh-2);
  padding: 8px; position: relative; z-index: 20;
}
.pick-pop > input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 11px; margin-bottom: 6px; outline: none;
}
.pick-list { max-height: 200px; overflow-y: auto; }
.pick-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12.6px;
}
.pick-item:hover { background: var(--accent-dim); }
.pick-item .pc { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item .pe { color: var(--muted); font-size: 11.4px; }
.pick-item .ok { color: var(--sprout); font-weight: 700; }

/* ---------------------------------------------------- POSTA ARAMA */
.mb-search { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.mb-search input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; outline: none; font-size: 12.8px;
}
.mb-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(109, 40, 217, .12); }

/* --------------------------------------------------- SABLON KITLESI */
.tpl-filter { display: flex; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.tpl-filter .tf {
  flex: 1; border: 1px solid var(--line); background: var(--bg-2);
  border-radius: 16px; padding: 4.5px 8px; font-size: 11.6px; cursor: pointer; color: var(--text-2);
  font-weight: 600; transition: .12s;
}
.tpl-filter .tf.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.aud-pill {
  display: inline-grid; place-items: center; height: 17px; padding: 0 7px;
  border-radius: 5px; font-size: 10px; font-weight: 700;
}
.aud-pill.partner { background: var(--accent-dim); color: var(--accent); }
.aud-pill.customer { background: rgba(232, 162, 42, .16); color: var(--warn); }
body.theme-dark .aud-pill.customer { color: #e8b654; }

/* ---------------------------------------------------- LOGO & KATALOG */
.logo-preview {
  min-height: 70px; border: 1px dashed var(--line); border-radius: 11px;
  display: grid; place-items: center; padding: 10px; margin-bottom: 9px;
  background: var(--bg);
}
.logo-preview img { max-height: 64px; max-width: 240px; }
.cat-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12.6px;
}
.cat-item .cs { color: var(--muted); font-size: 11px; }
.cat-item button { margin-left: auto; }

/* ------------------------------------------------------ KOMUT PALETI */
.palette-back {
  position: fixed; inset: 0; background: rgba(22, 13, 45, .48);
  display: none; justify-content: center; padding-top: 12vh; z-index: 9500;
  backdrop-filter: blur(4px);
}
.palette-back.open { display: flex; }
.palette {
  width: 560px; max-width: 92vw; height: fit-content;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--sh-3); overflow: hidden;
}
.palette input {
  width: 100%; border: 0; outline: none; background: transparent;
  padding: 17px 19px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--line-soft);
}
.palette-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.pal-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 13px; border-radius: 10px; cursor: pointer; font-size: 13.2px;
  color: var(--text-2);
}
.pal-item .pi { color: var(--muted); display: grid; place-items: center; }
.pal-item.sel, .pal-item:hover { background: var(--accent-dim); color: var(--text); }
.pal-item .pk { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.pal-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 13px 3px; font-weight: 700; }

/* Teklif modal kalemleri */
.q-item-row { display: flex; gap: 7px; margin-bottom: 7px; }
.q-item-row input.qn { flex: 1; }
.q-item-row input.qq { width: 64px; }
.q-item-row input.qu { width: 100px; }

/* ------------------------------------------- CEVAP KUTUSU KONUSMA GECMISI */
.ib-bubble .h.ib-tgl { cursor: pointer; user-select: none; }
.ib-bubble .tgl-ico::before { content: "\25be"; color: var(--muted); font-size: 10px; margin-left: 4px; }
.ib-bubble.closed .tgl-ico::before { content: "\25b8"; }
.ib-bubble.closed pre, .ib-bubble.closed .h.sub { display: none; }
.ib-bubble.closed { opacity: .78; }
.ib-item .ib-await {
  font-size: 9.5px; font-weight: 700; color: var(--warn);
  background: #f9efd7; border-radius: 999px; padding: 1px 8px; margin-left: 6px;
}
body.theme-dark .ib-item .ib-await { background: #3a2e12; color: #e8b654; }
.ib-item .ib-x {
  margin-left: auto; color: var(--muted); font-size: 11px; padding: 2px 6px;
  border-radius: 6px; visibility: hidden;
}
.ib-item:hover .ib-x { visibility: visible; }
.ib-item .ib-x:hover { background: #fbe5e8; color: #b02a44; }
body.theme-dark .ib-item .ib-x:hover { background: #3f1d24; color: #f2808f; }
.ib-item .c { display: flex; align-items: center; gap: 6px; }

.cat-item .cat-name { cursor: pointer; }
.cat-item .cat-name:hover { color: var(--accent); text-decoration: underline; }

/* -------------------------------------------------------- FIRMA ARASTIR */
.research-bar { display: flex; gap: 9px; }
.research-bar input { flex: 1; }
.research-bar #rs-hint { flex: .7; }
.rs-card .rs-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rs-card .rs-head h2 { font-size: 19px; margin-bottom: 3px; font-family: var(--font-display); letter-spacing: -.3px; }
.rs-actions { margin-left: auto; display: flex; gap: 7px; }
.rs-summary { font-size: 13.2px; line-height: 1.65; color: var(--text-2); background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px 15px; margin-bottom: 13px; }
.rs-grid { display: flex; flex-direction: column; gap: 2px; }
.rs-row { display: flex; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--line-soft); font-size: 12.8px; }
.rs-row .k { width: 90px; min-width: 90px; color: var(--muted); font-weight: 600; }
.rs-row .v { flex: 1; }
.rs-chip { display: inline-block; background: var(--accent-dim); color: var(--accent-2); border-radius: 999px; padding: 3px 12px; font-size: 11.8px; font-weight: 600; cursor: pointer; margin: 1px 2px 1px 0; }
.rs-chip:hover { filter: brightness(.94); }
body.theme-dark .rs-chip { color: #c4b5fd; }
.rs-src { display: inline-block; margin-bottom: 2px; }

/* ------------------------------------------ ARAMA ILERLEME (YENI TASARIM) */
.sp-hero { display: flex; align-items: center; gap: 13px; }
.sp-radar {
  width: 46px; height: 46px; min-width: 46px; border-radius: 50%;
  display: grid; place-items: center; position: relative; color: #fff;
  background: var(--grad-accent);
  box-shadow: 0 6px 18px rgba(109, 40, 217, .35);
}
.sp-radar::before, .sp-radar::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(124, 58, 237, .45);
  animation: radar-ping 1.8s ease-out infinite;
}
.sp-radar::after { animation-delay: .9s; }
.sp-radar.done { background: linear-gradient(135deg, #23854b, var(--sprout)); box-shadow: 0 6px 18px rgba(47, 158, 95, .35); }
.sp-radar.done::before, .sp-radar.done::after { animation: none; opacity: 0; }
@keyframes radar-ping {
  0% { transform: scale(.8); opacity: .9; }
  100% { transform: scale(1.55); opacity: 0; }
}
.sp-heromain { flex: 1; min-width: 0; }
.sp-phase-line { font-size: 13.2px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.sp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.sp-kpi {
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 9px 12px; text-align: center;
}
.sp-kpi b { display: block; font-size: 15px; color: var(--accent-2); font-family: var(--font-display); font-variant-numeric: tabular-nums; }
body.theme-dark .sp-kpi b { color: #c4b5fd; }
.sp-kpi small { font-size: 8.5px; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.sp-bar { position: relative; overflow: hidden; }
.sp-bar i#sp-fill { background: linear-gradient(90deg, var(--accent-soft), var(--accent)) !important; }
.sp-bar i#sp-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  animation: bar-shine 1.6s linear infinite;
}
@keyframes bar-shine { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Log satirlari: yumusak giris */
.log .log-line { animation: log-in .3s ease both; }
@keyframes log-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------ FIRMA ARASTIR ANIMASYON */
#rs-anim { display: flex; align-items: flex-start; gap: 15px; margin-top: 13px; }
.rs-spin-wrap { position: relative; width: 52px; height: 52px; min-width: 52px; }
.rs-spinner {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 15%, #7c3aed 60%, #c4b5fd 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: rs-spin 1s linear infinite;
}
.rs-spin-ic {
  position: absolute; inset: 0; display: grid; place-items: center; color: #7c3aed;
  animation: rs-breathe 1.6s ease-in-out infinite;
}
body.theme-dark .rs-spin-ic { color: #c4b5fd; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
@keyframes rs-breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.15); opacity: 1; } }
.rs-anim-main { flex: 1; }
.rs-anim-title { font-size: 13.6px; font-weight: 700; margin-bottom: 7px; }
.rs-dots i { animation: rs-blink 1.2s infinite; font-style: normal; }
.rs-dots i:nth-child(2) { animation-delay: .2s; }
.rs-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes rs-blink { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.rs-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.2px; color: var(--text-2); padding: 3.5px 0;
  animation: log-in .35s ease both;
}
.rs-step-ic {
  width: 15px; height: 15px; min-width: 15px; border-radius: 50%;
  border: 2px solid #a78bfa; border-top-color: transparent;
  animation: rs-spin .9s linear infinite;
}
.rs-step.done { color: var(--muted); }
.rs-step.done .rs-step-ic {
  border: 0; animation: none; background: var(--sprout); position: relative;
}
.rs-step.done .rs-step-ic::after {
  content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 9px; font-weight: 800;
}

/* Ozel sektor chipleri */
.chip.custom { border-style: dashed; padding-right: 6px; }
.chip .chip-x {
  font-style: normal; margin-left: 6px; font-size: 9.5px; color: var(--muted);
  padding: 1px 4px; border-radius: 5px;
}
.chip .chip-x:hover { background: #fbe5e8; color: #b02a44; }
.chip-tools a#btn-add-sector { font-weight: 700; }

/* Sektor chip'lerinde X yalnizca uzerine gelince gorunur */
#pick-sectors .chip .chip-x { visibility: hidden; }
#pick-sectors .chip:hover .chip-x { visibility: visible; }
.chip-restore {
  display: inline-block; font-size: 11px; color: var(--accent);
  padding: 4px 10px; cursor: pointer; text-decoration: underline;
}

/* Bulut: giris yapildi karti */
.cl-logged {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #eefaf1, #ddf4e6);
  border: 1px solid #b9e2ca; border-radius: 13px;
  padding: 13px 16px; margin-bottom: 12px;
}
body.theme-dark .cl-logged { background: #12291b; border-color: #1f4d31; }
.cl-check {
  width: 34px; height: 34px; min-width: 34px; border-radius: 50%;
  background: var(--sprout); color: #fff; display: grid; place-items: center;
  font-size: 17px; font-weight: 800;
}
.cl-logged-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cl-logged-main b { font-size: 13.6px; color: var(--sprout-deep); }
body.theme-dark .cl-logged-main b { color: #6fd99b; }
.cl-logged-main .muted { font-size: 11.5px; }

/* --------------------------------------------------- TAM EKRAN GIRIS */
.login-screen {
  position: fixed; inset: 0; z-index: 10000; display: flex;
  background: var(--bg);
}
.ls-left {
  flex: 1.1; color: #fff; padding: 60px 64px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(139, 92, 246, .55), transparent 62%),
    radial-gradient(720px 480px at -12% 108%, rgba(47, 158, 95, .28), transparent 58%),
    linear-gradient(158deg, #1d0b42 0%, #3b1490 52%, #6d28d9 100%);
}
/* Ince cizgi dokusu: sahneye derinlik verir, dikkat cekmez */
.ls-left::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 26px);
  pointer-events: none;
}
.ls-left::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  top: -160px; right: -130px; background: rgba(255, 255, 255, .05);
}
.ls-logo { width: 150px; margin-bottom: 22px; position: relative; }
.ls-left h1 {
  font-size: 41px; font-weight: 700; letter-spacing: -1.4px; margin-bottom: 12px;
  font-family: var(--font-display); position: relative; line-height: 1.12;
}
.ls-tag { font-size: 16px; font-weight: 400; opacity: .93; line-height: 1.6; margin-bottom: 34px; position: relative; }
.ls-feats { display: flex; flex-direction: column; gap: 12px; position: relative; }
.ls-feat {
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 13px; padding: 13px 18px; font-size: 13.4px; font-weight: 500;
  display: flex; align-items: center; gap: 11px;
  backdrop-filter: blur(2px);
}
.ls-feat::before {
  content: "\2713"; color: #7ee5a8; font-weight: 800;
  width: 21px; height: 21px; min-width: 21px; border-radius: 50%;
  background: rgba(47, 158, 95, .30); display: grid; place-items: center; font-size: 12px;
}
.ls-right { flex: 1; display: grid; place-items: center; padding: 40px; }
.ls-card { width: 100%; max-width: 384px; }
.ls-card h2 { font-size: 23px; letter-spacing: -.5px; margin-bottom: 6px; color: var(--text); font-family: var(--font-display); }
.ls-sub { color: var(--muted); font-size: 13.2px; margin-bottom: 22px; }
.ls-btn { width: 100%; padding: 11.5px; font-size: 14.5px; margin-top: 4px; }
.ls-err {
  background: #fbe5e8; color: #b02a44; border-radius: 10px;
  padding: 11px 14px; font-size: 12.6px; margin-bottom: 14px;
}
body.theme-dark .ls-err { background: #3f1d24; color: #f2808f; }
.ls-alt { margin-top: 16px; font-size: 12.6px; text-align: center; }
.ls-alt a { color: var(--accent); cursor: pointer; text-decoration: underline; }
.ls-foot { margin-top: 30px; font-size: 11.5px; color: var(--muted); text-align: center; }
body.theme-dark .login-screen { background: var(--bg); }

/* Sidebar hesap rozeti */
.nav-account {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 10px; padding: 9px 11px;
  background: rgba(109, 40, 217, .06); border: 1px solid rgba(109, 40, 217, .15);
  border-radius: 12px;
}
body.theme-dark .nav-account { background: rgba(166, 133, 250, .08); border-color: rgba(166, 133, 250, .2); }
.na-dot { width: 9px; height: 9px; min-width: 9px; border-radius: 50%; background: var(--sprout); box-shadow: 0 0 0 3px var(--sprout-dim); }
.na-main { flex: 1; min-width: 0; }
.na-mail { font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.na-org { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.na-out { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 7px; }
.na-out:hover { background: #fbe5e8; color: #b02a44; }
body.theme-dark .na-out:hover { background: #3f1d24; color: #f2808f; }

/* Aktif mail secici (sidebar) - ozel acilir liste */
.mail-switch { position: relative; margin: 8px 12px 4px; }
.ms-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 11px; cursor: pointer; text-align: left;
  background: rgba(109, 40, 217, .06); border: 1px solid rgba(109, 40, 217, .16);
  border-radius: 13px; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.ms-btn:hover { background: rgba(109, 40, 217, .11); border-color: rgba(109, 40, 217, .32); }
body.theme-dark .ms-btn { background: rgba(166, 133, 250, .08); border-color: rgba(166, 133, 250, .22); }
body.theme-dark .ms-btn:hover { background: rgba(166, 133, 250, .15); }
.ms-avatar {
  width: 28px; height: 28px; min-width: 28px; border-radius: 9px;
  display: grid; place-items: center; color: #fff;
  font-size: 13px; font-weight: 800; background: var(--accent);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .12);
}
.ms-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ms-label { font-size: 11.8px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-email { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-caret { color: var(--muted); font-size: 10px; }

.ms-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 800;
  background: var(--panel, #fff); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px;
  box-shadow: var(--sh-2);
  animation: ms-pop-in .16s ease;
}
body.theme-dark .ms-pop { box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
@keyframes ms-pop-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.ms-pop-title {
  font-size: 9.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
  color: var(--muted); padding: 6px 9px 4px;
}
.ms-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7.5px 9px; border-radius: 10px; cursor: pointer;
  transition: background .12s;
}
.ms-item:hover { background: var(--accent-dim, #f1ebfd); }
.ms-item.on { background: rgba(109, 40, 217, .08); }
body.theme-dark .ms-item.on { background: rgba(166, 133, 250, .12); }
.ms-check { color: var(--sprout); font-weight: 800; font-size: 13px; }
.ms-pop-foot {
  font-size: 9.5px; color: var(--muted); padding: 6px 9px 4px;
  border-top: 1px solid var(--line-soft); margin-top: 4px; line-height: 1.4;
}

/* Guncelleme cubugu (sidebar) */
.update-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  margin: 6px 12px; padding: 9px 12px;
  background: linear-gradient(135deg, #eefaf1, #ddf4e6);
  border: 1px solid #b9e2ca; border-radius: 11px; font-size: 11px; font-weight: 650;
}
.update-bar span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
body.theme-dark .update-bar { background: #12291b; border-color: #1f4d31; color: #d1fae5; }
.update-bar .btn { margin-left: auto; }
