/* Arı CRM — katman stilleri ve temalar. Temalar yalnızca renk değişkenlerini değiştirir; ekranlar ve işlevler aynıdır. */

/* ---- Tema: MyBasic (varsayılan) — değişkenler app.css :root içinde ---- */

/* ---- Tema: Arı Fuarcılık — Sektörel Altın & Obsidyen Antrasit Kurumsal Görünüm (2026 Pro Max) ---- */
:root[data-theme='ari'],
[data-theme='ari'] {
  --bar: #0d0d0d;
  --bar-ink: #ffd400;
  --side: #161616;
  --side-on: #ffd400;
  --side-on-ink: #0d0d0d;
  --bg: #fafaf7;
  --card: #ffffff;
  --ink: #111827;
  --quiet: #6b7280;
  --line: #e6e4dc;
  --soft: #f4f2ea;
  --label: #5c4c00;
  --link: #806a00;
  --accent: #ffd400;
  --accent-ink: #0d0d0d;
  --accent-text: #806a00;
  --bad: #ef4444;
  --ok: #10b981;
  --chip: #fff6c2;
  --head: #fff6c2;
  --fab2: #1f2937;
  --border-focus: #0d0d0d;
  --color-focus-ring: rgba(255, 212, 0, 0.45);
}
[data-theme='ari'] .top {
  border-bottom: 1px solid rgba(255, 212, 0, 0.2);
}
[data-theme='ari'] .top .logo b {
  color: #ffd400;
}
[data-theme='ari'] .top .search span {
  color: #ffd400;
}
[data-theme='ari'] .side a {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}
[data-theme='ari'] .side a:hover {
  background: rgba(255, 212, 0, 0.12);
  color: #fff6c2;
}
[data-theme='ari'] .side a.on,
[data-theme='ari'] .side a.on:hover {
  background: var(--side-on);
  color: var(--side-on-ink);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 212, 0, 0.3);
}
[data-theme='ari'] .side a.add,
[data-theme='ari'] .side a.add:hover {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 212, 0, 0.35);
}
[data-theme='ari'] .tile .num {
  color: #0d0d0d;
}
[data-theme='ari'] .it .tog {
  color: #806a00;
}
[data-theme='ari'] input:focus,
[data-theme='ari'] select:focus,
[data-theme='ari'] textarea:focus {
  outline: 0;
  border-color: #0d0d0d;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.45);
}
[data-theme='ari'] .cc:hover,
[data-theme='ari'] a.tile:hover {
  border-color: #ffd400;
  box-shadow: 0 4px 14px rgba(255, 212, 0, 0.15);
}
[data-theme='ari'] .login .logo {
  color: #0d0d0d;
}
[data-theme='ari'] .login .logo b {
  color: #ffd400;
}

/* ---- Tema: MyBasic — Orijinal Mavi & ArıCRM Şablonu (Kullanıcı Alışkanlıkları Korunur) ---- */
:root[data-theme='mybasic'],
[data-theme='mybasic'] {
  --bar: #3b5998;
  --bar-ink: #ffffff;
  --side: #5f7ec4;
  --side-on: #3b5998;
  --side-on-ink: #ffffff;
  --bg: #f3f5fa;
  --card: #ffffff;
  --ink: #1c2230;
  --quiet: #667085;
  --line: #c9d2e6;
  --soft: #e6eaf4;
  --label: #a8554f;
  --link: #3b5998;
  --accent: #ffd400;
  --accent-ink: #0d0d0d;
  --accent-text: #806a00;
  --bad: #b3392f;
  --ok: #2f7d4f;
  --chip: #e9edf7;
  --head: #f3f5fa;
  --border-focus: #3b5998;
  --color-focus-ring: rgba(59, 89, 152, 0.25);
}
[data-theme='mybasic'] .top {
  border-bottom: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
[data-theme='mybasic'] .side a {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
[data-theme='mybasic'] .side a:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
[data-theme='mybasic'] .side a.on {
  background: #3b5998;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ---- Tema: Koyu / Gece Modu (Dark Modern) ---- */
:root[data-theme='dark'],
[data-theme='dark'] {
  --bar: #0d121f;
  --bar-ink: #f8fafc;
  --side: #131b2e;
  --side-on: #2563eb;
  --side-on-ink: #ffffff;
  --bg: #090d16;
  --card: #111827;
  --ink: #f3f4f6;
  --quiet: #9ca3af;
  --line: #1f293d;
  --soft: #1a2336;
  --label: #ffd400;
  --link: #60a5fa;
  --accent: #ffd400;
  --accent-ink: #0d0d0d;
  --accent-text: #ffd400;
  --bad: #ef4444;
  --ok: #10b981;
  --chip: #1a2336;
  --head: #1a2336;
  --fab2: #1f2937;
  --border-focus: #60a5fa;
  --color-focus-ring: rgba(96, 165, 250, 0.25);
}
[data-theme='dark'] .top {
  border-bottom: 1px solid var(--line);
}
[data-theme='dark'] input,
[data-theme='dark'] select,
[data-theme='dark'] textarea {
  background: #0d121f;
  color: #f3f4f6;
  border-color: #26334d;
}
[data-theme='dark'] input:focus,
[data-theme='dark'] select:focus,
[data-theme='dark'] textarea:focus {
  border-color: #60a5fa;
  outline: 2px solid rgba(96, 165, 250, 0.25);
}
[data-theme='dark'] .panel,
[data-theme='dark'] .card,
[data-theme='dark'] .sec-head,
[data-theme='dark'] .sec-kpi-card,
[data-theme='dark'] .sre-card,
[data-theme='dark'] .pref-card,
[data-theme='dark'] .dash-hero-card {
  background: #111827 !important;
  border-color: #1f293d !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}
[data-theme='dark'] table th {
  background: #151f33;
  color: #cbd5e1;
}
[data-theme='dark'] table tr:hover td {
  background: #151f33;
}
[data-theme='dark'] .feed li {
  border-bottom-color: #1f293d;
}
[data-theme='dark'] .feed li:hover {
  background: #131b2e;
}
[data-theme='dark'] .sec-tabs {
  background: #131b2e;
  border-color: #1f293d;
}
[data-theme='dark'] .sec-tab-btn {
  color: #94a3b8;
}
[data-theme='dark'] .sec-tab-btn.active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---- Tema: Emerald Fuar (Zümrüt Yeşil & Doğa) ---- */
:root[data-theme='emerald'],
[data-theme='emerald'] {
  --bar: #064e3b;
  --bar-ink: #ecfdf5;
  --side: #065f46;
  --side-on: #10b981;
  --side-on-ink: #064e3b;
  --bg: #f0fdf4;
  --card: #ffffff;
  --ink: #0f172a;
  --quiet: #4b5563;
  --line: #d1fae5;
  --soft: #e6f7ef;
  --label: #047857;
  --link: #059669;
  --accent: #10b981;
  --accent-ink: #ffffff;
  --accent-text: #10b981;
  --bad: #ef4444;
  --ok: #10b981;
  --chip: #d1fae5;
  --head: #d1fae5;
  --fab2: #064e3b;
  --border-focus: #10b981;
  --color-focus-ring: rgba(16, 185, 129, 0.25);
}
[data-theme='emerald'] .top {
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme='emerald'] .top .logo b {
  color: #10b981;
}
[data-theme='emerald'] .side a.on {
  background: #10b981;
  color: #064e3b;
  font-weight: 700;
}

/* ---- Tema: Sapphire Enterprise (Modern Tech Safir Mavi & Çelik) ---- */
:root[data-theme='sapphire'],
[data-theme='sapphire'] {
  --bar: #0f172a;
  --bar-ink: #60a5fa;
  --side: #1e293b;
  --side-on: #2563eb;
  --side-on-ink: #ffffff;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --quiet: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --label: #1d4ed8;
  --link: #2563eb;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-text: #2563eb;
  --bad: #ef4444;
  --ok: #10b981;
  --chip: #dbeafe;
  --head: #dbeafe;
  --fab2: #1e293b;
  --border-focus: #2563eb;
  --color-focus-ring: rgba(37, 99, 235, 0.25);
}
[data-theme='sapphire'] .top {
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}
[data-theme='sapphire'] .top .logo b {
  color: #60a5fa;
}
[data-theme='sapphire'] .side a.on {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
}

/* ---- Tema: Burgundy Luxury (Bordo & Prestijli Lüks Fuar) ---- */
:root[data-theme='burgundy'],
[data-theme='burgundy'] {
  --bar: #4c0519;
  --bar-ink: #ffe4e6;
  --side: #881337;
  --side-on: #e11d48;
  --side-on-ink: #ffffff;
  --bg: #fff1f2;
  --card: #ffffff;
  --ink: #1c1917;
  --quiet: #78716c;
  --line: #fecdd3;
  --soft: #ffe4e6;
  --label: #be123c;
  --link: #e11d48;
  --accent: #e11d48;
  --accent-ink: #ffffff;
  --accent-text: #e11d48;
  --bad: #b91c1c;
  --ok: #15803d;
  --chip: #ffe4e6;
  --head: #ffe4e6;
  --fab2: #4c0519;
  --border-focus: #e11d48;
  --color-focus-ring: rgba(225, 29, 72, 0.25);
}
[data-theme='burgundy'] .top {
  border-bottom: 1px solid rgba(225, 29, 72, 0.2);
}
[data-theme='burgundy'] .top .logo b {
  color: #fda4af;
}
[data-theme='burgundy'] .side a.on {
  background: #e11d48;
  color: #ffffff;
  font-weight: 700;
}

/* ---- Tablo / Arayüz Yoğunluğu: Kompakt ---- */
:root[data-density='compact'] table td,
:root[data-density='compact'] table th {
  padding: 4px 8px !important;
  font-size: 12.5px;
}
:root[data-density='compact'] .feed li {
  padding: 5px 8px !important;
  font-size: 13px;
}
:root[data-density='compact'] .panel {
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
}
:root[data-density='compact'] .row {
  gap: 6px !important;
}

/* ---- Arama sonuçları ---- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tabs a {
  padding: 5px 12px;
  border-radius: 16px;
  background: var(--chip);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
}
.tabs a.on {
  background: var(--bar);
  color: var(--bar-ink, #fff);
}
h2.grp {
  margin: 14px 2px 6px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
.snip {
  font-size: 13px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

/* ---- Raporlama çubuğu ---- */
.rbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--soft);
}
.rbar select {
  width: auto;
  min-width: 220px;
  flex: 1;
}
label.inl {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.quick {
  align-self: center;
  font-size: 13px;
}
.sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.sum .tile {
  text-align: left;
  padding: 8px 10px;
}
.sum .tile td:nth-child(2) {
  text-align: right;
  font-weight: 700;
  padding: 2px 6px;
}
.sum .tile td:last-child {
  text-align: right;
  font-weight: 400;
  width: 38px;
}
.feed.tk li {
  border-bottom: 1px solid var(--soft);
  padding: 6px 2px;
}

/* Kişi bazlı kısıtlar: yapılamayan işlemin düğmesi gösterilmez (asıl denetim sunucuda) */
body[data-limits~='no_export'] a[href^='/api/export'],
body[data-limits~='no_export'] #rexcel,
body[data-limits~='hide_contacts'] a[href^='/api/export'],
body[data-limits~='hide_contacts'] #rexcel,
body[data-limits~='no_delete'] #del,
body[data-limits~='no_delete'] [data-delact] {
  display: none !important;
}

/* Her alanda arama + alan ölçütleri */
.filters.crit {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  align-items: center;
}
.filters.crit input[type='search'] {
  font-size: 15px;
  padding: 9px 12px;
}
.filters.crit input[type='search'] {
  flex: 1 1 320px;
  min-width: 240px;
}
.filters.crit #kfield {
  flex: 0 1 260px;
  width: auto;
}
.kform {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.kform select,
.kform input {
  width: auto;
}
.kchips {
  margin: 6px 0 2px;
}
.chip.kc {
  background: var(--bar);
  color: var(--bar-ink, #fff);
  padding: 3px 10px;
}
.chip.kc b {
  font-weight: 700;
}
.chip.kc a {
  color: inherit;
  text-decoration: none;
  margin-left: 6px;
}

/* Görüş bildir (client/feedback.js) */
.fb-kinds {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fb-kind {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line, #ddd);
  border-radius: 999px;
  cursor: pointer;
  font-weight: normal;
}
.fb-kind input {
  width: auto;
  margin: 0;
}
.fb-kind:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.fb-item {
  border-top: 1px solid var(--line, #eee);
  padding: 10px 0;
}
.fb-item:first-of-type {
  border-top: 0;
}
.fb-head {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.fb-text {
  white-space: pre-wrap;
  margin: 6px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.fb-reply {
  white-space: pre-wrap;
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  overflow-wrap: anywhere;
}
.fb-admin {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.fb-admin textarea {
  flex: 1;
  min-width: 220px;
}
.fb-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad, #dc2626);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.fb-notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--card, #fff);
  color: inherit;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  border-left: 4px solid var(--accent);
  text-decoration: none;
}
.fb-lead {
  margin: 2px 0 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 600;
}

/* Alan tasarımı (client/fields.js) */
.fw-ents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.fw-ents .on,
.fw-ptype.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.fw-dragging {
  opacity: 0.4;
}
.fw-req {
  color: #d33;
  font-weight: 700;
}
.fw-ok {
  color: #1a8a4a;
}
.fw-hint {
  padding: 10px 0;
}
.fw-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.fw-check input {
  width: auto;
}
.fd-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Modül sihirbazı (client/modules.js) */
.mw-msg {
  min-height: 18px;
  margin: 8px 0;
  color: var(--accent-text, var(--accent));
}
.mw-msg.bad {
  color: #d33;
}
.mw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.mw-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card, transparent);
  cursor: grab;
}
.mw-row .fw-grip {
  color: var(--quiet);
  font-size: 16px;
  user-select: none;
  touch-action: none; /* dokunmatik ekranda tutamaktan sürükleme sayfayı kaydırmasın */
}
.mw-ico {
  font-size: 20px;
  width: 28px;
  text-align: center;
}
.mw-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mw-name .small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mw-row.off {
  border-style: dashed;
  opacity: 0.6;
}
.mw-row.off .mw-name b {
  text-decoration: line-through;
}
.mw-acts {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mw-lock {
  align-self: center;
  padding: 0 6px;
}
.mw-row.mw-before {
  box-shadow: 0 -3px 0 0 var(--accent);
}
.mw-row.mw-after {
  box-shadow: 0 3px 0 0 var(--accent);
}
.mw-edit {
  list-style: none;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  margin: 2px 0 6px;
}
.mw-form {
  display: grid;
  gap: 8px;
}
.mw-form label {
  display: grid;
  gap: 4px;
}
.mw-form-row {
  display: flex;
  gap: 10px;
}
.mw-form-row .grow {
  flex: 1;
}
.mw-icon-in {
  width: 72px;
  font-size: 18px;
  text-align: center;
}
.mw-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mw-ic {
  font-size: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.mw-form-acts,
.mw-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mw-foot {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .mw-row {
    grid-template-columns: auto auto minmax(0, 1fr);
    cursor: default;
  }
  .mw-row .fw-grip {
    font-size: 22px;
    padding: 4px 6px;
  }
  .mw-acts {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
/* Tasarım modunda sayfa sağdaki panele yer açar */
body.fd-on main {
  padding-right: 320px;
}
.fd-panel {
  position: fixed;
  z-index: 60;
  top: 70px;
  right: 14px;
  width: 290px;
  max-height: calc(100vh - 86px);
  overflow: auto;
  margin: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.fd-ptop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fd-form {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.fd-fixed {
  padding: 6px 0;
}
.fd-paltitle {
  margin-top: 10px;
}
.fd-pal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.fd-pal .fw-ptype small {
  display: none;
}
.fd-grid {
  min-height: 60px;
  padding: 6px;
  border-radius: 8px;
  outline: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
  gap: 8px 14px;
}
.fd-drop-on .fd-grid {
  outline-color: var(--accent);
}
.fd-item {
  position: relative;
  padding: 22px 6px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.fd-item:hover,
.fd-item.on {
  border-color: var(--line);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.fd-item.on {
  border-color: var(--accent);
}
.fd-head {
  grid-column: 1 / -1;
}
.fd-head h2.section {
  margin-top: 0;
}
.fd-ghost {
  border: 2px dashed var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.fd-ghost :disabled {
  opacity: 0.7;
}
.fd-tools {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.fd-tools button {
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card, transparent);
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}
.fd-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}
.fd-grip {
  padding: 0 4px;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}
.fd-badge {
  font-size: 11px;
  color: var(--accent-text, var(--accent));
  font-weight: 600;
}
.fd-cond {
  display: grid;
  gap: 6px;
}
.fd-cond-row select {
  flex: 1;
  min-width: 0;
}
.fd-cond-vals {
  max-height: 180px;
  overflow: auto;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
}
.fd-end {
  grid-column: 1 / -1;
  padding: 8px;
  text-align: center;
}
.fd-before {
  box-shadow: -4px 0 0 0 var(--accent);
}
.fd-after {
  box-shadow: 4px 0 0 0 var(--accent);
}
.fd-head.fd-before {
  box-shadow: 0 -4px 0 0 var(--accent);
}
.fd-head.fd-after {
  box-shadow: 0 4px 0 0 var(--accent);
}
.fw-ptype[draggable='true'] {
  cursor: grab;
}
.fw-ptype {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.fw-ptype:disabled {
  opacity: 0.5;
  cursor: default;
}
.fw-ptype .ic {
  font-size: 18px;
}
.fw-ptype small {
  display: block;
  font-size: 11px;
  opacity: 0.7;
}
.fw-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.fw-radios label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: normal;
}
.fw-radios input {
  width: auto;
}
.fd-pbtns {
  display: flex;
  gap: 6px;
}
.fd-paltoggle {
  display: none;
}
/* Telefonda panel ekranın altında ince bir çubuktur: formu kapatmaz. Nitelikler "+ Alan ekle" ile tek satırlık
   kaydırılabilir şerit olarak açılır; alan düzenlenirken yalnız alan penceresi görünür. */
@media (max-width: 760px) {
  body.fd-on main {
    padding-right: 0;
    padding-bottom: 80px;
  }
  .fd-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 60vh;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }
  .fd-ptop {
    margin-bottom: 0;
  }
  .fd-paltoggle {
    display: inline-flex;
  }
  .fd-panel.fd-open .fd-paltoggle {
    background: var(--accent);
  }
  .fd-hint,
  .fd-panel .fw-hint,
  .fd-paltitle,
  .fd-pal .fw-ptype:disabled {
    display: none;
  }
  .fd-pal {
    display: none;
  }
  .fd-panel.fd-open .fd-pal {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-top: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .fd-panel.fd-open .fd-pal .fw-ptype {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 14px;
  }
  .fd-panel.fd-open .fd-pal .fw-ptype .ic {
    font-size: 18px;
  }
}

/* Departmanlar (client/departments.js) */
.dp-list {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.dp-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}
.dp-head,
.dp-new {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dp-head input,
.dp-new input {
  flex: 1 1 180px;
  max-width: 320px;
  font-weight: 600;
}
.dp-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.dp-mod {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.dp-mod input {
  width: auto;
}
.dp-users select {
  width: auto;
  font-size: 12px;
  padding: 3px 8px;
}

/* ---- E-posta: zengin metin düzenleyici, ekler ---- */
.rte { border: 1px solid var(--line); border-radius: 8px; background: var(--card); overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 4px; border-bottom: 1px solid var(--line); background: var(--panel-bg); }
.rte-bar select { width: auto; padding: 2px 4px; font-size: 12px; margin: 0; }
.rte-btn { position: relative; min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: none; color: inherit; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.rte-btn:hover { border-color: var(--line); }
.rte-btn input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.rte-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rte-area { padding: 10px 12px; outline: none; overflow: auto; max-height: 60vh; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; }
.rte-area:empty::before { content: attr(data-ph); opacity: .5; }
.rte-area img { max-width: 100%; }
.rte-area [data-sig] { color: inherit; }
.mc-att { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.mc-cardfiles { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; max-height: 160px; overflow: auto; }
.mc-cardfiles label { display: flex; gap: 6px; align-items: center; font-weight: normal; margin: 0; }
.mc-cardfiles input { width: auto; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mc-chip { border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; font-size: 12px; }
.mc-chip a { text-decoration: none; margin-left: 2px; }
