/* =========================================================================
   1. DEĞİŞKENLER VE TEMEL AYARLAR
   ========================================================================= */
:root {
  /* Açık Tema (Light Mode) */
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --border: #e6e0d5;
  --border-strong: #d7cfbf;
  --text: #211f1b;
  --text-soft: #6f6a62;
  --text-faint: #928b80;
  --accent: #1f4c7a;
  --accent-soft: #e9f1f8;
  --ok-bg: #e7f4ea;
  --ok: #21653a;
  --violet-bg: #efecfb;
  --violet: #5a45af;
  --warn-bg: #fbefdc;
  --warn: #8a5a0f;
  --danger-bg: #fce9e9;
  --danger: #a03838;
  --neutral-bg: #f0ede7;
  --neutral: #66615a;
  --reply-bg: #e5f0fb;
  --reply: #1d5fa4;
  --shadow: 0 12px 30px rgba(40, 32, 18, .06);
  --radius: 16px;
  --radius-sm: 12px;
}

/* Karanlık Tema (Dark Mode) Değişkenleri */
body.dark-mode {
  color-scheme: dark; /* Takvim ve sistem ikonlarını otomatik koyulaştırır */
  --bg: #121212;
  --surface: #1e1e1e;
  --surface-soft: #262626;
  --border: #333333;
  --border-strong: #4a4a4a;
  --text: #e2e2e2;
  --text-soft: #a0a0a0;
  --text-faint: #9ca3af; /* Okunabilirlik için aydınlatıldı */
  --accent: #64b5f6;
  --accent-soft: #1e3a5f;
  --ok-bg: #143d26;
  --ok: #6ee79e;
  --violet-bg: #2d1b54;
  --violet: #b39ddb;
  --warn-bg: #4a360a;
  --warn: #ffd54f;
  --danger-bg: #4d1a1a;
  --danger: #ff8a80;
  --neutral-bg: #2c2c2c;
  --neutral: #b0b0b0;
  --reply-bg: #163859;
  --reply: #64b5f6;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s, color 0.3s;
}
button, input, select, textarea { font: inherit; outline: none; }

/* =========================================================================
   2. GENEL SİSTEM BİLEŞENLERİ (Giriş, Yükleniyor, Tema)
   ========================================================================= */
.loading-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 999; }
.loading-text { font-size: 15px; font-weight: 600; color: var(--text-soft); }

.login-screen { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 998; }
.login-card { 
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; 
  padding: 48px 40px; width: 100%; max-width: 380px; text-align: center; 
  display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: var(--shadow);
}
.login-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--text); color: var(--bg); font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.google-btn { 
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; 
  padding: 13px 20px; border-radius: 12px; border: 1px solid var(--border-strong); 
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: .18s ease; 
}
.auth-error { font-size: 12px; color: var(--danger); background: var(--danger-bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; width: 100%; text-align: left; }

.theme-toggle { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; color: var(--text-soft); display: flex; align-items: center; justify-content: center; transition: .15s ease; }
.theme-toggle:hover { color: var(--text); }

.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px 5px 8px; box-shadow: var(--shadow); }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.user-name { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.user-signout { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--text-faint); }

/* =========================================================================
   3. MATRIX MODÜL SEÇİCİ
   ========================================================================= */
.matrix-shell { max-width: 1000px; margin: 0 auto; padding: 40px 24px; min-height: 100vh; }
.matrix-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }
.matrix-brand { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--text-soft); }
.matrix-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 24px; line-height: 1.3; }

.matrix-section-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin: 32px 0 16px 0; padding-top: 24px; border-top: 2px solid var(--border);
}
.matrix-section-title:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.matrix-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center;
  aspect-ratio: 1 / 1;
  gap: 10px;
}

.mc-badge {
  position: absolute; top: 10px; right: 10px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: 0.02em;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
  animation: badge-pop 0.25s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.mc-badge-pulse {
  animation: badge-pop 0.25s cubic-bezier(0.34,1.56,0.64,1) both,
             badge-glow 2.4s ease-in-out 0.25s infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--surface); }
  50%       { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(239,68,68,0.25); }
}

.matrix-card:hover {
  transform: translateY(-3px); border-color: var(--accent); background: var(--surface-soft);
}

.mc-icon { font-size: 36px; line-height: 1; }
.mc-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.mc-desc { font-size: 12px; color: var(--text-soft); line-height: 1.45; }

/* Upcoming modules */
.matrix-card.mc-upcoming {
  background: var(--surface); border: 1px dashed var(--border);
  opacity: 0.65; cursor: not-allowed;
}
.matrix-card.mc-upcoming:hover {
  transform: none; border-color: var(--border); background: var(--surface);
}
.mc-badge-soon {
  position: absolute; top: 10px; right: 10px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 6px; border-radius: 3px;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
}

/* =========================================================================
   4. CRM MODÜLÜ VE ENTEGRE FİLTRE PANELİ
   ========================================================================= */
.crm-shell { display: flex; flex-direction: column; min-height: 100vh; }
.crm-body  { max-width: 1500px; width: 100%; margin: 0 auto; padding: 24px; flex: 1; }
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.hero-copy h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 8px; }
.hero-copy p { font-size: 13px; color: var(--text-soft); line-height: 1.55; }
.back-to-matrix-btn { background: var(--surface); border: 1px solid var(--border-strong); padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-soft); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.back-to-matrix-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Unified module header ── */
.mod-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; gap: 12px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.mod-header-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mod-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mod-header-title { font-size: 16px; font-weight: 700; white-space: nowrap; color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-l { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 8px; font-weight: 700; }
.stat-v { font-size: 28px; font-weight: 700; }

.workspace { display: grid; grid-template-columns: 2fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.card-head { padding: 16px 18px 0 18px; }
.card-title { font-size: 15px; font-weight: 700; }
.card-body { padding: 16px 18px 18px 18px; }

.add-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.add-panel .field.full { grid-column: 1/-1; }

.field {
  display: flex; flex-direction: column; gap: 6px;
}
.fl {
  font-size: 10px; font-weight: 700; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: 0.03em;
}
.inp, .sel, .date-inp, .txt-inp {
  width: 100%; font-size: 12.5px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  outline: none; transition: all 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}
.inp:focus, .sel:focus {
  border-color: var(--accent); background: var(--surface-soft);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.inp:disabled, .sel:disabled { opacity: 0.5; cursor: not-allowed; }

textarea.inp {
  resize: vertical; min-height: 100px; font-family: inherit;
  line-height: 1.5;
}
textarea.inp::-webkit-scrollbar { width: 6px; }
textarea.inp::-webkit-scrollbar-track { background: transparent; }
textarea.inp::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 3px;
}
textarea.inp::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

/* Filtre Butonları (Karanlık Mod Uyumluluğu ile) */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fb { font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-soft); color: var(--text); cursor: pointer; transition: 0.2s; }
.fb.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* =========================================================================
   5. MÜŞTERİ LİSTESİ VE KART TASARIMI
   ========================================================================= */
.b2b-card-list { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface-soft); }
.b2b-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.b2b-card-head { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr 1.2fr; gap: 16px; padding: 14px 18px; cursor: pointer; align-items: center; }
.b2b-card-body { border-top: 1px solid var(--border); background: var(--surface-soft); padding: 20px 18px; }

.edit-grid { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 20px; }
.edit-section { display: flex; flex-direction: column; gap: 12px; }

.nm { font-weight: 700; font-size: 13.5px; }
.city, .ct { font-size: 11px; color: var(--text-soft); }
.badge { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral); }
.overdue { color: var(--danger); font-weight: 700; }

.tiny-btn { background: transparent; border: 1px solid var(--border); padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; cursor: pointer; color: var(--text-soft); }

/* =========================================================================
   6. GÖREVLER VE TAKVİM İKONU FIX
   ========================================================================= */
.task-legend { display: flex; gap: 12px; padding: 12px 18px; background: var(--surface-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend-badge { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 12px; flex-shrink: 0; }
.legend-badge.critical { background: #ff4757; }
.legend-badge.high { background: #ffa502; }
.legend-badge.low { background: #ffdd1a; color: #000; }
.legend-text { color: var(--text-soft); line-height: 1.4; }

.tasks-body { max-height: 500px; overflow-y: auto; padding: 8px; }

.task-empty { padding: 20px; text-align: center; color: var(--ok); font-weight: 600; font-size: 14px; }

.task-card {
  display: flex; flex-direction: column; margin-bottom: 10px;
  border-radius: 12px; transition: box-shadow 0.2s ease; position: relative;
  border-left: 5px solid var(--border); background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden;
}
.task-main {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  cursor: pointer; transition: background 0.15s ease;
}
.task-main:hover { background: rgba(128,128,128,0.06); }

.task-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.task-expanded { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

.task-editor {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-soft);
}
.task-editor-fields { display: flex; gap: 12px; flex: 1; flex-wrap: wrap; }
.task-editor-field { display: flex; flex-direction: column; gap: 5px; }
.task-editor-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.task-fu-input { min-width: 140px; }
.task-status-select { min-width: 130px; }
.task-editor-actions { display: flex; gap: 8px; align-items: flex-end; }
.task-editor-save { padding: 8px 20px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.task-editor-save:hover { opacity: 0.88; }
.task-editor-cancel { padding: 8px 14px; background: transparent; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text-soft); }
.task-editor-cancel:hover { border-color: var(--text-soft); }

/* Urgency levels with color coding */
.task-card.task-critical { border-left-color: #ff4757; background: rgba(255,71,87,0.08); }
.task-card.task-critical:hover { background: rgba(255,71,87,0.12); }

.task-card.task-high { border-left-color: #ffa502; background: rgba(255,165,2,0.08); }
.task-card.task-high:hover { background: rgba(255,165,2,0.12); }

.task-card.task-low { border-left-color: #ffdd1a; background: rgba(255,221,26,0.08); }
.task-card.task-low:hover { background: rgba(255,221,26,0.12); }
.task-card.task-upcoming { border-left-color: #3b82f6; background: rgba(59,130,246,0.06); }
.task-card.task-upcoming:hover { background: rgba(59,130,246,0.10); }

.task-urgency-badge {
  min-width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}

.task-card.task-critical .task-urgency-badge { background: #ff4757; color: white; }
.task-card.task-high .task-urgency-badge { background: #ffa502; color: white; }
.task-card.task-low .task-urgency-badge { background: #ffdd1a; color: #000; }
.task-card.task-upcoming .task-urgency-badge { background: #3b82f6; color: white; }

.task-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 4px 2px 8px; color: var(--text-faint);
}
.task-section-overdue { color: #ff4757; }
.task-section-upcoming { color: #3b82f6; }
.task-section-gap { height: 10px; }

.task-content { flex: 1; min-width: 0; }
.task-store { font-weight: 700; font-size: 13px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.task-store b { color: var(--text); }
.task-city { font-size: 11px; color: var(--text-faint); font-weight: normal; }
.task-contact { font-size: 12px; color: var(--text-soft); margin-bottom: 2px; }
.task-email { font-size: 11px; color: var(--text-faint); margin-bottom: 2px; font-family: monospace; }
.task-son-temas { font-size: 11px; color: var(--text-soft); margin-bottom: 6px; }
.task-status { font-size: 11px; display: flex; gap: 6px; align-items: center; }
.task-label { color: var(--text-faint); font-weight: 600; text-transform: uppercase; }
.task-status-badge { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 10px; }

.task-followup { text-align: right; flex-shrink: 0; min-width: 60px; }
.task-date { font-weight: 700; font-size: 12px; color: var(--text); }
.task-action { font-size: 16px; color: var(--accent); margin-top: 2px; }

@keyframes highlightFlash {
  0%, 100% { background: var(--surface); }
  50% { background: rgba(31, 76, 122, 0.15); }
}

.b2b-card.highlight-flash { animation: highlightFlash 1.5s ease-in-out; }

/* Takvim ikonu rengi (Dark mode'da parlaması için) */
body.dark-mode ::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.5);
}

/* =========================================================================
   7. OWNERSHIP & LOGISTICS (own- namespace)
   ========================================================================= */
.own-wrapper { max-width: 1500px; margin: 0 auto; padding: 24px; }
.own-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.own-h1 { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.own-flex-row { display: flex; gap: 12px; flex-wrap: wrap; }
.own-input { flex: 1; min-width: 200px; }
.own-btn-primary { background: var(--text); color: var(--bg); border: none; padding: 10px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; }

.own-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.own-table th { font-size: 10px; text-transform: uppercase; color: var(--text-faint); padding: 12px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.own-table td { padding: 12px 8px; font-size: 13px; border-bottom: 1px solid var(--border); }
.own-tr:hover { background: var(--surface-soft); }

.own-hash-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ok); }
.own-center { text-align: center; }
.own-del-btn { background: transparent; border: 1px solid var(--border); color: var(--danger); font-size: 10px; font-weight: 700; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.own-del-btn:hover { background: var(--danger-bg); }

.own-input-inline { background: transparent; border: none; border-bottom: 1px solid var(--border); color: var(--text); font-size: 12px; padding: 4px 8px; font-family: inherit; cursor: text; transition: 0.2s; }
.own-input-inline:focus { border-color: var(--accent); outline: none; }
.own-color-picker { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.own-color-picker:hover { border-color: var(--accent); }

.cpk-wrap { display: inline-block; cursor: pointer; }
.cpk-swatch { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: 0.15s; }
.cpk-swatch:hover { border-color: var(--accent); transform: scale(1.1); }

.cpk-popup { position: absolute; z-index: 9999; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 240px; }
.cpk-row { display: flex; align-items: center; gap: 10px; }
.cpk-label { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; min-width: 72px; }
.cpk-hex-input { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: 12px; font-family: monospace; }
.cpk-hex-input:focus { outline: none; border-color: var(--accent); }

.own-status-btn { width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 14px; border: 1px solid; cursor: pointer; transition: all 0.2s; }
.own-status-on { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.own-status-on:hover { background: var(--ok); color: var(--ok-bg); }
.own-status-off { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.own-status-off:hover { background: var(--danger); color: var(--danger-bg); }

.own-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.own-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow); }
.own-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-bottom: 6px; }
.own-stat-value { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 8px; }
.own-stat-bar { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.own-stat-bar div { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.own-stat-pct { font-size: 11px; color: var(--text-faint); font-weight: 600; }

.own-filter-bar { display: flex; gap: 8px; padding: 12px; background: var(--surface-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.own-filter-input { flex: 1; min-width: 100px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12px; }
.own-filter-input:focus { outline: none; border-color: var(--accent); }
.own-filter-reset { padding: 8px 16px; background: var(--text); color: var(--bg); border: none; border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer; transition: 0.2s; }
.own-filter-reset:hover { background: var(--accent); }

.own-sortable { cursor: pointer; user-select: none; position: relative; transition: 0.2s; }
.own-sortable:hover { background: var(--surface-soft); }
.own-sort-arrow { font-size: 11px; margin-left: 4px; opacity: 0.5; transition: 0.2s; }
.own-sortable:hover .own-sort-arrow { opacity: 1; }

/* =========================================================================
   8. EDIT MODAL (Contact Editing)
   ========================================================================= */
.edit-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.edit-modal-content { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; display: flex; flex-direction: column; }
.edit-modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.edit-modal-header h2 { font-size: 18px; font-weight: 700; margin: 0; }
.edit-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-soft); padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.edit-modal-close:hover { color: var(--text); }
.edit-modal-body { padding: 24px; flex: 1; }
.edit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edit-modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.btn-delete { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 10px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-delete:hover { background: var(--danger); color: #fff; }
.btn-cancel { background: var(--surface-soft); border: 1px solid var(--border-strong); padding: 10px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; color: var(--text); transition: 0.2s; }
.btn-cancel:hover { background: var(--border); }
.btn-save { background: var(--text); color: var(--bg); border: none; padding: 10px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-save:hover { background: var(--accent); }

/* Action Buttons (for modals) */
.act {
  padding: 10px 20px; border: none; border-radius: 8px; font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.act:active { transform: scale(0.98); }
.act:disabled { opacity: 0.5; cursor: not-allowed; }

.act.primary {
  background: linear-gradient(135deg, var(--accent), #9d4edd);
  color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  position: relative; overflow: hidden;
}
.act.primary::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.act.primary:hover {
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); transform: translateY(-2px);
}
.act.primary:hover::before { left: 100%; }
.act.primary:active { transform: translateY(0); }

.act.secondary {
  background: var(--surface-soft); color: var(--text);
  border: 1px solid var(--border-strong);
}
.act.secondary:hover { background: var(--border); border-color: var(--text-soft); }

.act.danger {
  background: rgba(239, 68, 68, 0.1); color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.act.danger:hover { background: rgba(239, 68, 68, 0.15); border-color: #ef4444; }

/* Follow-up History */
.followup-history-section {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.fh-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.followup-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 300px;
  overflow-y: auto;
}
.followup-item {
  display: grid;
  grid-template-columns: 100px 80px 1fr 80px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
}
.fh-date { font-weight: 600; color: var(--text); }
.fh-type {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(99,102,241,0.12);
  color: #818cf8;
  border-radius: 3px;
  font-weight: 600;
}
.fh-note { color: var(--text-soft); }
.fh-outcome {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}
.fh-outcome.positive { background: rgba(16,185,129,0.15); color: #10b981; }
.fh-outcome.neutral { background: rgba(107,114,128,0.15); color: #6b7280; }
.fh-outcome.negative { background: rgba(239,68,68,0.15); color: #ef4444; }
.fh-outcome.no_response { background: rgba(107,114,128,0.15); color: #6b7280; }
.fh-del-btn { background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 2px 5px; cursor: pointer; font-size: 11px; color: var(--danger); font-weight: bold; }
.fh-del-btn:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.add-followup-form {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.fh-form-row {
  display: grid;
  grid-template-columns: 100px 120px 1fr 100px;
  gap: 8px;
  margin-bottom: 8px;
}
.fh-form-row:last-child { margin-bottom: 0; }
.fh-inp { font-size: 11px !important; }
.fh-add-btn { background: var(--ok); border: none; border-radius: 5px; padding: 5px 10px; cursor: pointer; font-size: 11px; color: #fff; font-weight: 700; }
.fh-add-btn:hover { opacity: 0.9; }
.followup-empty { font-size: 11px; color: var(--text-faint); padding: 10px 0; text-align: center; }

.extra-contacts-section {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.ec-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#extraContactsList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.extra-contact-empty {
  font-size: 12px;
  color: var(--text-faint);
  padding: 10px 0;
  text-align: center;
}
.extra-contact-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  transition: border-color 0.2s;
}
.extra-contact-item:hover { border-color: var(--accent); }
.extra-contact-item.extra-contact-editing { border-color: var(--accent); background: var(--surface-soft); }
@keyframes ecFlash { 0%,100% { border-color: var(--border); } 40% { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 20%, transparent); } }
.extra-contact-item.ec-new { animation: ecFlash 1s ease; }
.ec-name { font-weight: 600; }
.ec-role { color: var(--text-soft); }
.ec-email { font-family: monospace; font-size: 11px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-actions { display: flex; gap: 4px; justify-content: flex-end; }
.ec-edit-btn { background: transparent; border: 1px solid var(--border); border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 12px; color: var(--text-soft); }
.ec-edit-btn:hover { border-color: var(--accent); color: var(--accent); }
.ex-del { background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 12px; color: var(--danger); font-weight: bold; }
.ex-del:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.ec-save-btn { background: var(--ok); border: none; border-radius: 5px; padding: 3px 8px; cursor: pointer; font-size: 12px; color: #fff; font-weight: 700; }
.ec-cancel-btn { background: transparent; border: 1px solid var(--border); border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 12px; color: var(--text-soft); }
.ec-inp { font-size: 11px !important; }
.inp-error { border-color: var(--danger) !important; animation: shake 0.35s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.add-extra-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr auto;
  gap: 8px;
  background: var(--surface-soft);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.ec-add-inp { font-size: 11px !important; }
.ec-add-btn {
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* =========================================================================
   3D ÜRÜN ÖZELLEŞTİRİCİ MODÜLÜ STİLLERİ
   ========================================================================= */
.customizer3d-shell {
  display: flex; flex-direction: column;
  height: 100vh;
}
.customizer3d-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #0d0d0d;
}

/* =========================================================================
   WEB SİTESİ YÖNETİMİ MODÜLÜ STİLLERİ
   ========================================================================= */
.web-shell {
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.web-hint {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0 0 14px;
}
.web-loading, .web-empty, .web-error {
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
}
.web-error { color: #ef4444; }
.web-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.web-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.web-section-type { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.web-section-id { font-size: 12px; color: var(--text-soft); }
.web-product-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; }
.web-field-label { display: block; font-size: 12px; color: var(--text-soft); margin: 10px 0 4px; }
.web-text-input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--field-bg, var(--surface)); color: var(--text);
  font-size: 14px;
}
.web-text-input--narrow { max-width: 160px; }
.web-json-editor {
  width: 100%; min-height: 140px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12.5px; line-height: 1.5;
  padding: 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--field-bg, var(--surface)); color: var(--text);
  resize: vertical;
}
.web-section-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

/* =========================================================================
   SOSYAL MEDYA MODÜLÜ STİLLERİ
   ========================================================================= */
/* ── Social Media Shell ─────────────────────── */
.social-media-shell {
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* sm-title kept for legacy Instagram badge alignment */
.sm-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.sm-new-post-btn { font-size: 12px; padding: 5px 12px; }

/* Natural-flow body — page scrolls, no inner viewport */
.sm-body {
  padding: 12px 16px 40px;
  display: flex; flex-direction: column; gap: 12px;
}

/* Top 2-column grid: stats | ideas */
.sm-top-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Posts card below */
.sm-posts-card { margin: 0; }

/* Compact card spacing inside sm-body */
.sm-body .card { margin: 0; }

.social-media-dashboard { display: flex; flex-direction: column; gap: 24px; }

/* Bölüm Başlıkları */
.section-label {
  font-size: 14px; font-weight: 700; color: var(--text-soft);
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}

.section-drafts, .section-published {
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
}

/* Instagram badge */
.ig-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease;
}
.ig-badge-connected {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08));
  color: #10b981; border: 1px solid rgba(16,185,129,0.3);
}
.ig-badge-disconnected { background: rgba(107,114,128,0.08); color: var(--text-faint); border: 1px solid var(--border); }
.ig-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Instagram settings modal */
.ig-settings-section {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface-soft); padding: 16px; border-radius: 8px;
}
.ig-settings-help {
  font-size: 12px; color: var(--text-soft); line-height: 1.6;
  border-left: 2px solid var(--accent); padding-left: 12px;
}
.ig-test-result {
  padding: 12px 16px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.08); color: var(--text);
  border-left: 3px solid rgba(99,102,241,0.5);
}
.ig-test-ok   { background: rgba(16,185,129,0.1); color: #10b981; border-left-color: #10b981; }
.ig-test-fail { background: rgba(239,68,68,0.1); color: #ef4444; border-left-color: #ef4444; }

/* Post modal IG row */
.ig-publish-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(167,139,250,0.04));
  border: 1px solid rgba(167,139,250,0.25); transition: all 0.15s ease;
}
.ig-publish-row:hover {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(167,139,250,0.06));
  border-color: rgba(167,139,250,0.35);
}
.ig-publish-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ig-publish-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.ig-publish-note { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

.subsection-scheduled, .subsection-live { margin-bottom: 16px; }
.subsection-scheduled:last-child { margin-bottom: 0; }

/* =========================================================================
   INSTAGRAM STATS PANEL
   ========================================================================= */

.ig-stats-panel { margin: 0; display: flex; flex-direction: column; }
.ig-stats-panel .card-body { flex: 1; }

.ig-stats-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px;
}
.ig-stats-head-left { display: flex; align-items: center; gap: 8px; }
.ig-stats-head-right { display: flex; align-items: center; gap: 8px; }
.ig-stats-panel-icon { font-size: 18px; }

/* Empty / Error states */
.ig-stats-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 16px; text-align: center;
  color: var(--text-faint); font-size: 12px;
}
.ig-stats-empty-icon  { font-size: 28px; opacity: 0.4; }
.ig-stats-error {
  padding: 14px 18px; border-radius: 8px; font-size: 12px;
  background: rgba(239,68,68,0.08); color: #ef4444;
  border-left: 3px solid #ef4444;
}

/* Profile header — compact */
.ig-stats-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.ig-stats-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent); flex-shrink: 0;
}
.ig-stats-profile-info { flex: 1; min-width: 0; }
.ig-stats-handle { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-stats-name   { font-size: 11px; color: var(--text-soft); margin-top: 1px; }
.ig-stats-bio    { display: none; }
.ig-stats-meta   { font-size: 10px; color: var(--text-faint); white-space: nowrap; }

/* KPI grid — 2 cols in narrow panel, 4 cols wide */
.ig-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-bottom: 14px;
}
.ig-kpi-card {
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 8px; text-align: center;
  transition: border-color 0.15s;
}
.ig-kpi-card:hover { border-color: var(--accent); }
.ig-kpi-icon  { font-size: 16px; margin-bottom: 3px; }
.ig-kpi-value { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ig-kpi-label { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); margin-top: 2px; letter-spacing: 0.04em; }
.ig-kpi-sub   { font-size: 9px; color: var(--text-faint); margin-top: 1px; }

/* Recent media grid — 3 cols in panel */
.ig-recent-label {
  font-size: 11px; font-weight: 700; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.ig-media-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ig-media-card {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 1; border: 2px solid transparent;
  text-decoration: none; transition: all 0.15s ease;
  display: block;
}
.ig-media-card:hover { transform: scale(1.04); border-color: var(--accent); }
.ig-media-top  { border-color: rgba(251,191,36,0.6); }

.ig-media-thumb {
  width: 100%; height: 100%; background-size: cover; background-position: center;
  background-color: var(--surface-soft);
}
.ig-media-nothumb {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; opacity: 0.4;
}
.ig-media-metrics {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 12px 6px 5px; display: flex; gap: 6px; justify-content: center;
}
.ig-media-toptag {
  position: absolute; top: 4px; right: 4px;
  background: rgba(251,191,36,0.9); color: #000;
  font-size: 9px; font-weight: 800; border-radius: 4px;
  padding: 2px 4px; letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .ig-ideas-panel, .ig-stats-panel { max-height: none; }
  .ig-ideas-list { max-height: 200px; }
}

/* ==========================================
   INSTAGRAM POST IDEAS
   ========================================== */
.ig-ideas-panel {
  margin: 0;
  display: flex; flex-direction: column;
}
.ig-ideas-body {
  display: flex; flex-direction: column;
}
.ig-ideas-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ig-ideas-head-left { display: flex; align-items: center; gap: 8px; flex: 1; }
.ig-ideas-icon { font-size: 16px; }
.ig-ideas-badge {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

.ig-ideas-input-row {
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; flex-shrink: 0;
}
.ig-idea-textarea {
  flex: 1; resize: none; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: 13px;
  font-family: inherit; transition: border-color 0.15s; line-height: 1.45;
}
.ig-idea-textarea:focus { outline: none; border-color: var(--accent); }
.ig-idea-add-btn { align-self: flex-end; white-space: nowrap; font-size: 12px; padding: 6px 12px; }

.ig-ideas-list {
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; flex: 1; min-height: 0;
}
.ig-ideas-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 0; }

.ig-idea-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 8px 10px;
  transition: border-color 0.15s;
}
.ig-idea-item:hover { border-color: var(--accent-muted, #7c3aed44); }
.ig-idea-item.voted-up   { border-left: 3px solid #10b981; }
.ig-idea-item.voted-down { border-left: 3px solid #ef4444; opacity: 0.55; }

.ig-idea-body { flex: 1; min-width: 0; }
.ig-idea-text { font-size: 12px; color: var(--text); line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.ig-idea-meta { font-size: 10px; color: var(--muted); margin-top: 3px; }

.ig-idea-edit-area {
  width: 100%; resize: none; padding: 6px 8px;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 5px; color: var(--text); font-size: 12px;
  font-family: inherit; line-height: 1.4;
}
.ig-idea-edit-area:focus { outline: none; }
.ig-idea-edit-actions { display: flex; gap: 5px; margin-top: 5px; }

.ig-idea-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ig-idea-btn {
  background: none; border: none; cursor: pointer;
  padding: 3px 4px; border-radius: 4px;
  font-size: 13px; transition: background 0.12s, transform 0.1s;
  color: var(--muted); line-height: 1;
}
.ig-idea-btn:hover { background: var(--surface); transform: scale(1.15); }
.ig-idea-btn.vote-up.active   { color: #10b981; }
.ig-idea-btn.vote-down.active { color: #ef4444; }
.ig-idea-btn.edit-btn:hover   { color: #3b82f6; }
.ig-idea-btn.delete-btn:hover { color: #ef4444; }

.section-scheduled .section-label { color: #3b82f6; }
.section-published-items .section-label { color: #10b981; }

/* Post Card */
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-card:hover { border-color: var(--accent); }

.post-card-head {
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; background: var(--surface-soft);
  transition: background 0.15s;
}
.post-card-head:hover { background: var(--surface); }

.post-platform-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}

.post-title {
  flex: 1; font-weight: 600; font-size: 13px;
  color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.post-status-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}

.post-status-badge {
  background: var(--neutral-bg); color: var(--neutral);
}
.post-card:has(.post-expand-arrow) + .post-card .post-status-badge {
  /* Will be overridden per status in JavaScript */
}

.post-expand-arrow {
  font-size: 10px; color: var(--text-faint);
  transition: transform 0.2s;
  width: 12px; text-align: center;
}

/* Post Card Expanded */
.post-card-body {
  padding: 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
}

.post-section {
  font-size: 12px;
}
.post-section strong {
  color: var(--text); display: block; margin-bottom: 6px;
}
.post-section p {
  color: var(--text-soft); line-height: 1.4; margin: 0;
}

.post-image-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.post-thumbnail {
  width: 60px; height: 60px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
}

/* Post image upload (new draft modal) */
.post-image-upload-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.post-image-upload-row .inp { flex: 1; min-width: 180px; }
.post-image-upload-row .act { white-space: nowrap; }
.post-image-progress {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 12px; color: var(--muted, #888);
}
.post-image-progress-bar {
  flex: 1; height: 6px; border-radius: 4px;
  background: var(--surface-soft, #2a2a2a); overflow: hidden;
}
.post-image-progress-bar > div {
  height: 100%; background: var(--accent, #a78bfa);
  width: 0%; transition: width .2s ease;
}
.post-image-preview {
  position: relative; margin-top: 8px; display: inline-block;
}
.post-image-preview img {
  max-width: 160px; max-height: 160px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border); display: block;
}
.post-image-remove {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; cursor: pointer; line-height: 1;
  background: var(--danger, #e74c3c); color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

/* Engagement Metrics */
.engagement-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px; margin-top: 8px; padding: 10px;
  background: var(--surface-soft); border-radius: 6px;
}

.engagement-metric {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.metric-label {
  font-size: 10px; color: var(--text-faint); font-weight: 600;
}
.metric-value {
  font-size: 16px; font-weight: 700; color: var(--text);
}

/* Engagement Editor */
.engagement-editor {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px; padding: 10px; background: var(--accent-soft); border-radius: 6px;
}
.eng-input {
  padding: 6px 8px; font-size: 12px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--surface); color: var(--text);
  text-align: center;
}
.eng-actions {
  grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end;
}

/* Post Actions */
.post-actions {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.btn-action {
  padding: 6px 12px; font-size: 11px; font-weight: 600;
  border-radius: 5px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-action:hover { border-color: var(--accent); color: var(--accent); }
.btn-action.btn-delete { color: var(--danger); border-color: transparent; }
.btn-action.btn-delete:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }

.btn-inline-edit {
  padding: 4px 10px; font-size: 11px; font-weight: 600;
  border-radius: 4px; border: 1px solid var(--border);
  background: transparent; color: var(--text-soft); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-inline-edit:hover { border-color: var(--accent); color: var(--accent); }

/* Modal Container (Post & Instagram Settings) */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.5); align-items: center; justify-content: center;
  animation: modalFadeIn 0.2s ease forwards;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }

.modal-overlay {
  position: fixed; inset: 0; cursor: pointer; z-index: -1;
}
.modal-content {
  position: relative; background: var(--surface); border-radius: 12px;
  width: 90%; max-width: 620px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex; flex-direction: column; z-index: 1001;
  animation: contentSlideUp 0.25s ease forwards;
}
@keyframes contentSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface);
}
.modal-header h3 {
  font-size: 18px; font-weight: 700; margin: 0;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.modal-close {
  background: none; border: none; font-size: 24px;
  color: var(--text-soft); cursor: pointer; padding: 4px;
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; border-radius: 6px;
  transition: all 0.15s ease;
}
.modal-close:hover {
  background: var(--surface-soft); color: var(--text);
}

.modal-body {
  padding: 24px; flex: 1; overflow-y: auto;
}
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-soft);
}

.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 12px; justify-content: flex-end;
  background: var(--surface-soft);
}

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px;
}
.form-grid .field { gap: 6px; }
.form-grid .field.full { grid-column: 1 / -1; }

.caption-counter {
  font-size: 11px; color: var(--text-faint); float: right; margin-top: 2px;
}
.caption-counter.over-limit { color: var(--danger); font-weight: 700; }

.empty-state {
  padding: 24px; text-align: center; color: var(--text-faint);
  font-size: 13px; background: var(--surface-soft); border-radius: 8px;
  border: 1px dashed var(--border);
}
.ec-add-btn:hover { opacity: 0.88; }

/* =========================================================================
   9. RESPONSIVE (MOBİL VE EKRAN DARALTMA UYUMU)
   ========================================================================= */

/* Tablet ve küçük ekranlı bilgisayarlar (1024px ve altı) */
@media (max-width: 1024px) {
  /* CRM Çalışma alanı: Günlük Görevler ve Yeni Kayıt panellerini alt alta al */
  .workspace { grid-template-columns: 1fr; gap: 24px; } 
  /* İstatistik kartlarını 4 sütun yerine 2 sütuna düşür */
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Mobil cihazlar ve iyice daraltılmış pencereler (768px ve altı) */
@media (max-width: 768px) {
  /* Üst Kısım (Hero) */
  .hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-right { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
  
  /* İstatistikler */
  .stats { grid-template-columns: 1fr; } /* İyice daralınca tek sütun yap */

  /* Form ve Ekleme Panelleri */
  .add-panel { grid-template-columns: 1fr; gap: 16px; }
  .edit-form-grid, .form-grid { grid-template-columns: 1fr; }
  .add-extra-contact-row { grid-template-columns: 1fr; }

  /* Müşteri Listesi (CRM) Kart Tasarımı */
  .b2b-card-head { 
    grid-template-columns: 1fr; /* Kart içerisindeki tüm kolonları alt alta listele */
    gap: 12px; 
    align-items: flex-start;
  }
  
  .b2b-card-head .col {
    display: flex;
    justify-content: space-between; /* Etiket ve değeri yan yana tut */
    align-items: center;
    width: 100%;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
  }
  .b2b-card-head .col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Ek Kontaklar Listesi */
  .extra-contact-item { 
    grid-template-columns: 1fr; 
    gap: 8px; 
    padding: 12px;
  }
  .ec-actions { justify-content: flex-start; }

  /* Modallar */
  .modal {
    padding: 0 16px;
  }
  .modal-content, .edit-modal-content {
    width: 100%; max-height: 90vh;
    margin: 0; border-radius: 16px;
  }
  .modal-header h3 { font-size: 16px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 16px; flex-wrap: wrap; gap: 8px; }
  
  /* Ownership Tablosu (Sayfayı taşırmaması için kendi içinde scroll ataması) */
  .own-overflow { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    width: 100%;
    border-radius: var(--radius-sm);
  }
  .own-table {
    min-width: 800px; /* Tablo hücrelerinin okunamaz hale gelmesini engeller */
  }
}

/* =========================================================================
   AI INSIGHTS PANEL
   ========================================================================= */
.ai-panel {
  margin: 0 0 20px 0;
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius);
  background: linear-gradient(135deg,
    rgba(139,92,246,0.06) 0%,
    rgba(99,102,241,0.04) 50%,
    var(--surface) 100%);
  overflow: hidden;
  transition: all 0.3s ease;
}
.ai-panel.collapsed .ai-panel-body { display: none; }
.ai-panel.collapsed .ai-toggle-btn { transform: rotate(180deg); }

.ai-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  gap: 12px;
}
.ai-panel-left  { display: flex; align-items: center; gap: 10px; }
.ai-panel-right { display: flex; align-items: center; gap: 12px; }

.ai-panel-icon  { font-size: 14px; color: #a78bfa; }
.ai-panel-title { font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
                  text-transform: uppercase; color: #a78bfa; }
.ai-model-tag   { font-size: 10px; font-weight: 600; padding: 2px 8px;
                  border-radius: 99px; background: rgba(139,92,246,0.15);
                  color: #a78bfa; font-family: monospace; letter-spacing: 0.04em; }
.ai-timestamp   { font-size: 11px; color: var(--text-faint); }
.ai-toggle-btn  { background: none; border: none; color: var(--text-faint);
                  cursor: pointer; font-size: 11px; padding: 4px 8px;
                  border-radius: 6px; transition: all 0.2s;
                  transform-origin: center; }
.ai-toggle-btn:hover { background: var(--surface-soft); color: var(--text); }

.ai-panel-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
@media (max-width: 768px) {
  .ai-panel-body { grid-template-columns: 1fr; }
}

.ai-col {
  padding: 18px 20px;
}
.ai-col + .ai-col {
  border-left: 1px solid rgba(139,92,246,0.12);
}
.ai-col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px;
}

/* Daily list */
.ai-daily-list { display: flex; flex-direction: column; gap: 10px; }
.ai-daily-item {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px;
  align-items: start; padding: 10px 12px;
  background: var(--surface-soft); border-radius: var(--radius-sm);
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.ai-daily-item:hover { border-color: rgba(139,92,246,0.3); }
.ai-daily-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(139,92,246,0.2); color: #a78bfa;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.ai-daily-content { display: flex; flex-direction: column; gap: 3px; }
.ai-daily-action  { font-size: 13px; font-weight: 600; color: var(--text); }
.ai-daily-contact { font-size: 11px; color: #a78bfa; font-weight: 600; }
.ai-daily-reason  { font-size: 11px; color: var(--text-soft); line-height: 1.4; }
.ai-daily-channel {
  display: inline-block; margin-top: 2px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 1px 7px; border-radius: 99px;
  background: rgba(99,102,241,0.12); color: #818cf8;
}

/* Feedback buttons */
.ai-feedback-buttons {
  display: flex; gap: 4px; margin-left: auto; padding-left: 8px;
}
.ai-feedback-btn {
  background: none; border: none; font-size: 14px; cursor: pointer;
  opacity: 0.5; transition: all 150ms ease;
  padding: 4px 6px; border-radius: 4px;
}
.ai-feedback-btn:hover { opacity: 0.9; background: rgba(139,92,246,0.1); }
.ai-feedback-btn.active { opacity: 1; background: rgba(139,92,246,0.2); }
.ai-task-btn { opacity: 0.6; }
.ai-task-btn:hover { opacity: 1; background: rgba(16,185,129,0.15); }
@keyframes slideIn {
  0% { transform: translateX(400px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Weekly card */
.ai-weekly-card { display: flex; flex-direction: column; gap: 12px; }
.ai-weekly-headline {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.4; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ai-weekly-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
}
.ai-weekly-stat {
  text-align: center; padding: 10px 6px;
  background: var(--surface-soft); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.ai-weekly-stat-val { font-size: 22px; font-weight: 800; color: #a78bfa; }
.ai-weekly-stat-lbl { font-size: 10px; color: var(--text-faint);
                      text-transform: uppercase; letter-spacing: 0.05em; }
.ai-weekly-section { display: flex; flex-direction: column; gap: 6px; }
.ai-weekly-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint);
}
.ai-weekly-pill {
  font-size: 12px; padding: 5px 10px;
  border-radius: var(--radius-sm); line-height: 1.4;
}
.ai-weekly-pill.opportunity {
  background: rgba(16,185,129,0.08); color: #34d399;
  border: 1px solid rgba(16,185,129,0.2);
}
.ai-weekly-pill.risk {
  background: rgba(239,68,68,0.08); color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.ai-weekly-momentum {
  display: flex; align-items: center; gap: 10px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.ai-momentum-bar {
  flex: 1; height: 6px; background: var(--surface-soft);
  border-radius: 3px; overflow: hidden;
}
.ai-momentum-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  transition: width 0.8s cubic-bezier(0.25,1,0.5,1);
}
.ai-momentum-label { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* Skeleton loaders */
.ai-skeleton {
  height: 14px; border-radius: 4px; width: 100%; margin-bottom: 8px;
  background: linear-gradient(90deg,
    var(--surface-soft) 25%, rgba(139,92,246,0.08) 50%, var(--surface-soft) 75%);
  background-size: 200% 100%;
  animation: ai-shimmer 1.5s infinite;
}
@keyframes ai-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Per-contact AI summary in edit modal */
.ai-contact-summary {
  margin: 0 0 16px 0; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.07), rgba(99,102,241,0.04));
  border: 1px solid rgba(139,92,246,0.2); border-radius: var(--radius-sm);
}
.ai-contact-summary-header {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: #a78bfa; margin-bottom: 8px;
}
.ai-contact-summary-text {
  font-size: 13px; color: var(--text-soft); line-height: 1.6;
  margin-bottom: 8px;
}
.ai-contact-next-step {
  font-size: 12px; color: #a78bfa; font-weight: 600;
  padding: 6px 10px; background: rgba(139,92,246,0.1);
  border-radius: 6px;
}
.ai-contact-next-step::before { content: "→ "; }

/* Empty/error state */
.ai-empty {
  font-size: 12px; color: var(--text-faint); text-align: center;
  padding: 20px 0; font-style: italic;
}

/* =========================================================================
   PROMPT GENERATOR PANEL
   ========================================================================= */
.pg-panel { margin: 0; }
.pg-toggle { cursor: pointer; user-select: none; display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; }
.pg-toggle:hover { opacity: 0.85; }
.pg-chevron { font-size: 11px; color: var(--muted); transition: transform 0.2s; }
.pg-chevron-open { transform: rotate(180deg); }

.pg-body { display: none; padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.pg-body.pg-open { display: block; }
.sm-cb-hidden { display: none !important; }

.pg-hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; padding: 8px 12px;
  background: var(--surface); border-radius: var(--radius); border-left: 2px solid var(--accent); }

.pg-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.pg-tab { font-size: 13px; font-weight: 500; padding: 8px 16px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .12s; white-space: nowrap; }
.pg-tab:hover { color: var(--text); }
.pg-tab-active { color: var(--text) !important; border-bottom-color: var(--accent) !important; }

.pg-pane { display: none; }
.pg-pane-active { display: block; }

.pg-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.pg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.pg-label { font-size: 11px; font-weight: 600; color: var(--text); display: block; margin-bottom: 7px; margin-top: 2px; }
.pg-label-hint { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.pg-ss27-label { font-size: 10px; font-weight: 600; color: #C4A882; display: block; margin: 10px 0 5px; }

/* =========================================================================
   FINANCIAL MANAGEMENT MODULE (fin- prefix)
   ========================================================================= */

/* ── Body ── */
.fin-body {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Stat Cards ── */
.fin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.fin-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.fin-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.fin-stat-value {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.fin-positive { color: #27ae60; }
.fin-negative { color: var(--danger); }

/* ── Card ── */
.fin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fin-card-head {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.fin-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ── Chart ── */
.fin-chart-card {}
.fin-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.fin-legend-income { color: #27ae60; }
.fin-legend-expense { color: var(--danger); }
.fin-chart-wrap {
  padding: 16px 20px 12px;
}
.fin-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 160px;
}
.fin-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.fin-chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  flex: 1;
  width: 100%;
  justify-content: center;
}
.fin-bar {
  width: 16px;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height 0.4s ease;
  cursor: default;
}
.fin-bar-income  { background: #27ae60; }
.fin-bar-expense { background: var(--danger); }
.fin-chart-label {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Filters ── */
.fin-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.2fr;
  gap: 10px;
  align-items: center;
}

/* ── Table ── */
.fin-table-wrap {
  overflow-x: auto;
}
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fin-table thead {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.fin-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  white-space: nowrap;
}
.fin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.fin-table tbody tr:last-child td { border-bottom: none; }
.fin-table tbody tr:hover { background: var(--surface-soft); }

.fin-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 40px 20px;
  font-size: 14px;
}

.fin-category-badge {
  display: inline-block;
  background: var(--neutral-bg);
  color: var(--neutral);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Row actions ── */
.fin-tx-actions {
  display: flex;
  gap: 6px;
}
.fin-edit-btn, .fin-delete-btn {
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}
.fin-edit-btn {
  background: var(--accent-soft);
  color: var(--accent);
}
.fin-edit-btn:hover { background: #d0e3f3; }
.fin-delete-btn {
  background: var(--danger-bg);
  color: var(--danger);
}
.fin-delete-btn:hover { background: #f5c6c6; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .fin-stats { grid-template-columns: repeat(2, 1fr); }
  .fin-filters { grid-template-columns: 1fr 1fr; }
  .fin-stat-value { font-size: 20px; }
}
@media (max-width: 580px) {
  .fin-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fin-filters { grid-template-columns: 1fr; }
  .fin-body { padding: 14px; gap: 14px; }
  .fin-bar { width: 10px; }
  .fin-chart-bars { gap: 6px; }
}

.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pg-chip {
  font-size: 12px; font-weight: 500; padding: 6px 13px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--bg); color: var(--muted);
  cursor: pointer; transition: all .15s; user-select: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.pg-chip:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
.pg-chip-on {
  background: var(--accent) !important; color: #fff !important;
  border-color: var(--accent) !important; font-weight: 600;
}
.pg-chip-on::before { content: '✓ '; font-size: 11px; opacity: 0.9; }
.pg-chip-ss27 { border-style: dashed; border-color: #C4A882; color: #8B7355; }
.pg-chip-ss27.pg-chip-on { background: #8B7355 !important; border-color: #8B7355 !important; border-style: solid; }

.pg-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px;
  background: rgba(196,168,130,0.2); color: #8B7355; }
.pg-note { font-size: 11px; font-weight: 400; color: var(--muted); }
.pg-chip-on .pg-note { color: rgba(255,255,255,0.7); }

.pg-reel-zone { display: none; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; margin: 0 0 14px; }
.pg-reel-zone.pg-show { display: block; }

.pg-generate-btn { width: 100%; margin-top: 12px; }

.pg-output { display: none; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pg-output.pg-show { display: block; }
.pg-output-head { background: var(--surface); padding: 9px 14px; display: flex;
  justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.pg-output-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.pg-copy-btn { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; transition: all .12s; }
.pg-copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Prompt output — monospace for AI tool pasting */
.pg-prompt-text { padding: 14px; font-size: 12px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word; font-family: 'Menlo','Consolas',monospace;
  margin: 0; }

/* Caption output — readable prose */
.pg-caption-text { padding: 16px; font-size: 13px; line-height: 1.85; color: var(--text); }
.pg-caption-text .pg-cap-opener { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 10px; display: block; }
.pg-caption-text .pg-cap-body { color: var(--muted); margin-bottom: 10px; display: block; }
.pg-caption-text .pg-cap-product { font-weight: 600; color: var(--text); margin-bottom: 10px; display: block; }
.pg-caption-text .pg-cap-tags { font-size: 12px; color: var(--accent); display: block; }

.pg-ref-block { margin-top: 12px; }
.pg-ref { font-size: 12px; line-height: 1.8; color: var(--text); background: var(--surface);
  border-radius: var(--radius); padding: 11px 14px; }
.pg-ref strong { font-weight: 600; color: var(--text); }

.pg-schedule-grid { display: flex; flex-direction: column; gap: 7px; }
.pg-day { display: grid; grid-template-columns: 42px 76px 1fr; align-items: start;
  gap: 10px; padding: 9px 12px; background: var(--surface); border-radius: var(--radius); }
.pg-day-name { font-weight: 700; font-size: 12px; color: var(--text); padding-top: 1px; }
.pg-day-type { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 99px; text-align: center; white-space: nowrap; }
.pg-day-type.reel   { background: rgba(139,92,246,0.12); color: #a78bfa; }
.pg-day-type.feed   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.pg-day-type.story  { background: rgba(245,158,11,0.12); color: #fbbf24; }
.pg-day-type.ledger { background: rgba(196,168,130,0.15); color: #8B7355; }
.pg-day-desc { font-size: 12px; color: var(--muted); line-height: 1.55; }

@media (max-width: 640px) {
  .pg-row2 { grid-template-columns: 1fr; }
  .pg-day { grid-template-columns: 36px 64px 1fr; }
}

/* ==========================================
   LEGAL DOCUMENTS MODULE
   ========================================== */
.legal-docs-shell {
  display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg);
}

.ld-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
  gap: 12px; position: sticky; top: 0; z-index: 40;
}

.ld-header-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.ld-title { font-size: 18px; font-weight: 700; color: var(--text); }
.ld-header-right { display: flex; align-items: center; gap: 8px; }

.ld-body {
  padding: 16px 20px; flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}

.ld-filters {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px;
  background: var(--surface); padding: 12px; border-radius: var(--radius);
}

.ld-list-container {
  flex: 1; overflow-y: auto; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}

.ld-list {
  display: flex; flex-direction: column; gap: 8px; padding: 12px;
}

.ld-item {
  display: grid; grid-template-columns: 1fr 100px 120px 80px auto; gap: 12px;
  align-items: center; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s;
}

.ld-item:hover {
  border-color: var(--accent); background: rgba(167,130,246,0.05);
}

.ld-item-info { display: flex; flex-direction: column; gap: 4px; }
.ld-item-partner { font-weight: 600; color: var(--text); }
.ld-item-type { font-size: 12px; color: var(--muted); }

.ld-item-status {
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 4px; text-align: center; white-space: nowrap;
}

.ld-item-status.draft { background: rgba(108,117,125,0.15); color: #6c757d; }
.ld-item-status.signed { background: rgba(40,167,69,0.15); color: #28a745; }
.ld-item-status.active { background: rgba(0,123,255,0.15); color: #007bff; }
.ld-item-status.expired { background: rgba(220,53,69,0.15); color: #dc3545; }
.ld-item-status.terminated { background: rgba(111,66,193,0.15); color: #6f42c1; }

.ld-item-date { font-size: 12px; color: var(--muted); text-align: center; }

.ld-item-actions {
  display: flex; gap: 6px;
}

.ld-item-actions button {
  padding: 4px 8px; font-size: 11px; border: none; border-radius: 3px;
  cursor: pointer; transition: opacity 0.2s;
}

.ld-item-actions button:hover { opacity: 0.8; }

.ld-download-btn { background: var(--accent); color: #fff; }
.ld-edit-btn { background: var(--muted); color: #fff; }
.ld-delete-btn { background: var(--danger); color: #fff; }

@media (max-width: 1024px) {
  .ld-filters { grid-template-columns: 1fr; }
  .ld-item { grid-template-columns: 1fr auto auto; }
  .ld-item-status { grid-column: 2; }
  .ld-item-date { display: none; }
  .ld-item-actions { grid-column: 3; }
}

/* =========================================================================
   HUMAN RESOURCES MODULE (hr- prefix)
   ========================================================================= */

.hr-body {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Dashboard Stats ── */
.hr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.hr-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.hr-stat-label {
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.hr-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.hr-stat-amber  { color: #f39c12; }
.hr-stat-warn   { color: #e67e22; }
.hr-stat-green  { color: #27ae60; }

/* ── Two-column layout ── */
.hr-main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1100px) {
  .hr-main-layout {
    grid-template-columns: 3fr 2fr;
  }
}

.hr-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.hr-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hr-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.hr-section-head .hr-section-title {
  margin-bottom: 0;
}

/* ── Employee Grid ── */
.hr-emp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 1300px) {
  .hr-emp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hr-emp-grid { grid-template-columns: 1fr; }
  .hr-stats { grid-template-columns: repeat(2, 1fr); }
}

.hr-emp-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.18s;
}

.hr-emp-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.hr-emp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.hr-emp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.hr-emp-pos {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.hr-emp-date {
  font-size: 11px;
  color: var(--text-faint);
}

.hr-emp-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.hr-emp-actions .act {
  font-size: 12px;
  padding: 5px 10px;
  flex: 1;
}

/* ── Status Badges ── */
.hr-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hr-status-active  { background: rgba(39,174,96,0.15);  color: #27ae60; }
.hr-status-onleave { background: rgba(243,156,18,0.15); color: #f39c12; }
.hr-status-left    { background: rgba(108,117,125,0.15); color: #6c757d; }

/* ── Leave Table ── */
.hr-table-wrap {
  overflow-x: auto;
}

.hr-leave-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hr-leave-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.hr-leave-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.hr-leave-table tr:last-child td { border-bottom: none; }
.hr-leave-table tr:hover td { background: var(--surface-soft); }

/* ── Leave Status Badges ── */
.hr-leave-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.hr-leave-pending  { background: rgba(243,156,18,0.15); color: #f39c12; }
.hr-leave-approved { background: rgba(39,174,96,0.15);  color: #27ae60; }
.hr-leave-rejected { background: rgba(160,56,56,0.15);  color: var(--danger); }

/* ── Leave Filters ── */
.hr-leave-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.hr-filter-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.hr-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hr-filter-active {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ── Leave Actions ── */
.hr-leave-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ── Days Display ── */
.hr-days-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ── Empty state ── */
.hr-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-soft);
  font-size: 14px;
}

.hr-empty-cell {
  text-align: center;
  padding: 24px;
  color: var(--text-soft);
}

/* Module Grid Responsive Design */
@media (max-width: 1200px) {
  .matrix-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .matrix-grid { grid-template-columns: repeat(2, 1fr); }
  .mc-title { font-size: 12px; }
  .mc-desc { font-size: 10px; }
}

@media (max-width: 480px) {
  .matrix-grid { grid-template-columns: 1fr; }
  .mc-icon { font-size: 28px; }
  .mc-title { font-size: 11px; }
}

/* =========================================================================
   SUPPLY CHAIN MODULE — sc- prefix
   ========================================================================= */

/* ── Shell & Body ── */
.sc-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Dashboard Stats ── */
.sc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.sc-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.sc-stat-label {
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sc-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.sc-stat-accent { color: var(--accent); }
.sc-stat-warn   { color: #e67e22; }
.sc-stat-green  { color: #27ae60; }

/* ── Tabs ── */
.sc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.sc-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.15s, border-color 0.15s;
}

.sc-tab:hover { color: var(--accent); }

.sc-tab-active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
}

/* ── Supplier Cards Grid ── */
.sc-supplier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) { .sc-supplier-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .sc-supplier-grid { grid-template-columns: 1fr; } }

.sc-supplier-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.18s;
}

.sc-supplier-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.sc-supplier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sc-supplier-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.sc-supplier-city {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.sc-supplier-badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}

.sc-supplier-contact {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sc-supplier-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-supplier-terms {
  font-size: 11px;
  color: var(--text-faint);
}

/* ── Inventory Grid ── */
.sc-inv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) { .sc-inv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .sc-inv-grid { grid-template-columns: 1fr; } }

.sc-inv-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.18s;
}

.sc-inv-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.sc-inv-card-low {
  border-color: #e67e22;
  background: rgba(230, 126, 34, 0.04);
}

.sc-inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sc-inv-sku {
  font-size: 11px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 2px;
}

.sc-inv-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.sc-inv-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sc-inv-stock-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-inv-stock-label {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
}

.sc-inv-stock-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sc-inv-stock-low { color: #e67e22; }

.sc-inv-low-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(230,126,34,0.15);
  color: #e67e22;
}

.sc-inv-cost {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.sc-inv-cost-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
}

.sc-inv-location {
  font-size: 12px;
  color: var(--text-soft);
}

.sc-inv-min-stock {
  font-size: 11px;
  color: var(--text-faint);
}

/* ── Shared Card Actions ── */
.sc-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.sc-card-actions .act {
  font-size: 12px;
  padding: 5px 10px;
  flex: 1;
}

/* ── Badges ── */
.sc-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Supplier status badges */
.sc-status-active    { background: rgba(39,174,96,0.15);  color: #27ae60; }
.sc-status-passive   { background: rgba(108,117,125,0.15); color: #6c757d; }
.sc-status-blacklist { background: rgba(160,56,56,0.15);  color: var(--danger); }

/* Category badges */
.sc-cat-raw   { background: rgba(52,152,219,0.15);  color: #2980b9; }
.sc-cat-pkg   { background: rgba(155,89,182,0.15);  color: #8e44ad; }
.sc-cat-mch   { background: rgba(243,156,18,0.15);  color: #d68910; }
.sc-cat-svc   { background: rgba(39,174,96,0.15);   color: #1e8449; }
.sc-cat-log   { background: rgba(230,126,34,0.15);  color: #ca6f1e; }
.sc-cat-other { background: rgba(108,117,125,0.15); color: #6c757d; }
.sc-cat-semi  { background: rgba(52,152,219,0.15);  color: #1a5276; }
.sc-cat-fin   { background: rgba(39,174,96,0.15);   color: #1e8449; }

/* PO status badges */
.sc-po-draft     { background: rgba(108,117,125,0.15); color: #6c757d; }
.sc-po-sent      { background: rgba(52,152,219,0.15);  color: #2980b9; }
.sc-po-approved  { background: rgba(39,174,96,0.15);   color: #27ae60; }
.sc-po-partial   { background: rgba(243,156,18,0.15);  color: #d68910; }
.sc-po-delivered { background: rgba(39,174,96,0.25);   color: #1e8449; }
.sc-po-cancelled { background: rgba(160,56,56,0.15);   color: var(--danger); }

/* ── PO Table ── */
.sc-table-wrap { overflow-x: auto; }

.sc-po-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.sc-po-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--surface-soft);
}

.sc-po-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.sc-po-table tr:last-child td { border-bottom: none; }
.sc-po-table tr:hover td { background: var(--surface-soft); }

.sc-table-actions {
  display: flex;
  gap: 4px;
}

.sc-table-actions .act {
  font-size: 11px;
  padding: 4px 8px;
}

.sc-empty-cell {
  text-align: center;
  padding: 32px;
  color: var(--text-soft);
  font-size: 14px;
}

/* ── PO Filters ── */
.sc-po-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sc-po-filter-btn {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.sc-po-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sc-filter-active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ── PO Modal Items ── */
.sc-po-items-section {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sc-po-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.sc-po-items-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sc-po-items-labels {
  display: grid;
  grid-template-columns: 2fr 80px 90px 110px 100px 36px;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
}

.sc-po-item-row {
  display: grid;
  grid-template-columns: 2fr 80px 90px 110px 100px 36px;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.sc-po-item-row:last-child { border-bottom: none; }

.sc-po-item-row .inp {
  padding: 6px 8px;
  font-size: 12px;
}

.sc-item-line-total {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
}

.sc-item-remove {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 11px;
  border-radius: 6px;
  flex-shrink: 0;
}

.sc-po-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-top: 2px solid var(--border);
}

.sc-po-total-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.sc-po-total-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* ── Stock Update Modal ── */
.sc-stock-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.sc-stock-current {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

/* ── Empty State ── */
.sc-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-soft);
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sc-stats { grid-template-columns: repeat(2, 1fr); }
  .sc-body  { padding: 16px 16px 40px; }
  .sc-po-items-labels { display: none; }
  .sc-po-item-row {
    grid-template-columns: 1fr 60px 70px 90px 80px 32px;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .sc-stats { grid-template-columns: 1fr 1fr; }
  .sc-po-item-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
}

/* =========================================================================
   MÜŞTERI DESTEK MODULE  (cs- prefix)
   ========================================================================= */

/* ── Shell & Body ── */
.cs-body {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ── Stats ── */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.cs-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.cs-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.cs-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.cs-stat-accent { color: var(--accent); }
.cs-stat-danger { color: var(--danger); }
.cs-stat-green  { color: var(--ok); }

/* ── Tabs ── */
.cs-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.cs-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.15s ease;
}

.cs-tab:hover { color: var(--text); background: var(--surface-soft); }
.cs-tab-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
}

/* ── Filter bar ── */
.cs-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cs-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.cs-filter-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cs-filter-tab:hover { border-color: var(--accent); color: var(--accent); }

.cs-filter-tab-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Search bar ── */
.cs-search-bar {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.cs-search-bar .inp {
  width: 100%;
  font-size: 13px;
  padding: 7px 12px;
}

/* ── Table ── */
.cs-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cs-ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cs-ticket-table th {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  white-space: nowrap;
}

.cs-ticket-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.cs-ticket-table tr:last-child td { border-bottom: none; }
.cs-ticket-table tr:hover td { background: var(--surface-soft); }

.cs-empty-cell {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-soft);
  font-size: 14px;
}

.cs-ticket-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.cs-customer-name { font-weight: 600; color: var(--text); }
.cs-customer-sub  { font-size: 11px; color: var(--text-faint); }

/* ── Priority badges ── */
.cs-priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cs-p-low    { background: var(--neutral-bg); color: var(--neutral); }
.cs-p-mid    { background: var(--reply-bg);   color: var(--reply); }
.cs-p-high   { background: var(--warn-bg);    color: var(--warn); }
.cs-p-urgent { background: var(--danger-bg);  color: var(--danger); }

/* ── Status badges ── */
.cs-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cs-s-open       { background: var(--reply-bg);   color: var(--reply); }
.cs-s-inprogress { background: var(--warn-bg);     color: var(--warn); }
.cs-s-waiting    { background: var(--violet-bg);   color: var(--violet); }
.cs-s-resolved   { background: var(--ok-bg);       color: var(--ok); }
.cs-s-closed     { background: var(--neutral-bg);  color: var(--neutral); }

/* ── Category badge ── */
.cs-cat-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Actions column ── */
.cs-actions-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 160px;
}

.cs-action-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── Quick status buttons ── */
.cs-quick-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cs-qb-process {
  background: var(--warn-bg);
  color: var(--warn);
}
.cs-qb-process:hover { opacity: 0.8; }

.cs-qb-resolve {
  background: var(--ok-bg);
  color: var(--ok);
}
.cs-qb-resolve:hover { opacity: 0.8; }

/* ── FAQ Grid ── */
.cs-faq-filter-bar {
  margin-bottom: 16px;
}

.cs-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cs-faq-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-soft);
  font-size: 14px;
}

.cs-faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
}

.cs-faq-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

.cs-faq-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-faq-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.cs-faq-status-pub   { background: var(--ok-bg);      color: var(--ok); }
.cs-faq-status-draft { background: var(--neutral-bg);  color: var(--neutral); }

.cs-faq-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cs-faq-preview {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

.cs-faq-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cs-tag {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
}

.cs-faq-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
  .cs-faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .cs-body { padding: 12px 12px 40px; }
  .cs-stats { grid-template-columns: 1fr 1fr; }
  .cs-filter-bar { flex-direction: column; align-items: flex-start; }
  .cs-search-bar { max-width: 100%; }
  .cs-faq-grid { grid-template-columns: 1fr; }

  .cs-actions-cell { min-width: 120px; }
}

/* =========================================================================
   MUHASEBE (acc- namespace)
   ========================================================================= */

/* ── Shell & Body ── */
.acc-shell { display: flex; flex-direction: column; min-height: 100vh; }
.acc-body  { max-width: 1400px; width: 100%; margin: 0 auto; padding: 20px 24px 40px; flex: 1; }

/* ── Stat Cards ── */
.acc-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.acc-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
}
.acc-stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-faint); margin-bottom: 8px;
}
.acc-stat-value {
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2;
}
.acc-stat-value.acc-positive { color: var(--ok); }
.acc-stat-value.acc-negative { color: var(--danger); }
.acc-stat-value.acc-accent   { color: var(--accent); }

/* ── Tabs ── */
.acc-tabs {
  display: flex; gap: 4px; background: var(--surface-soft);
  border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 18px;
}
.acc-tab {
  flex: 1; padding: 9px 16px; border: none; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-soft);
  background: transparent; transition: all 0.18s ease;
}
.acc-tab:hover { color: var(--text); background: var(--border); }
.acc-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(31,76,122,.25); }

/* ── Filter Row ── */
.acc-filter-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.acc-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.acc-filter-tab {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-soft); color: var(--text-soft); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: 0.15s;
}
.acc-filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.acc-filter-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.acc-search-input {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 12px;
  outline: none; transition: 0.15s; min-width: 220px;
}
.acc-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,76,122,.1); }

/* ── Table ── */
.acc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.acc-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.acc-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); padding: 12px 14px; background: var(--surface-soft);
  border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.acc-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.acc-table tr:last-child td { border-bottom: none; }
.acc-table tr:hover td { background: var(--surface-soft); }
.acc-empty { text-align: center; padding: 28px; color: var(--text-faint); font-size: 13px; }

/* ── Status Badges ── */
.acc-status-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
/* Sales */
.acc-badge-draft      { background: var(--neutral-bg);  color: var(--neutral); }
.acc-badge-sent       { background: var(--accent-soft);  color: var(--accent); }
.acc-badge-paid       { background: var(--ok-bg);        color: var(--ok); }
.acc-badge-overdue    { background: var(--danger-bg);    color: var(--danger); }
.acc-badge-cancelled  { background: var(--neutral-bg);  color: var(--text-faint); text-decoration: line-through; }
/* Purchase */
.acc-badge-received   { background: var(--warn-bg);     color: var(--warn); }
.acc-badge-approved   { background: var(--accent-soft);  color: var(--accent); }
.acc-badge-dispute    { background: var(--danger-bg);    color: var(--danger); }

/* ── Row Actions ── */
.acc-row-actions { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.acc-quick-btn {
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--surface-soft); color: var(--text-soft); transition: 0.15s;
}
.acc-quick-btn:hover { border-color: var(--accent); color: var(--accent); }
.acc-btn-edit   { color: var(--accent); border-color: var(--accent-soft); }
.acc-btn-delete { color: var(--danger); border-color: var(--danger-bg); }
.acc-btn-delete:hover { background: var(--danger-bg); }
.acc-btn-action { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.acc-btn-action:hover { background: var(--accent); color: #fff; }
.acc-btn-paid   { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bg); }
.acc-btn-paid:hover { background: var(--ok); color: #fff; }

/* ── Modal ── */
.acc-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 1100;
}
.acc-modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  width: 95%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden;
}
.acc-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.acc-modal-header h2 { font-size: 16px; font-weight: 700; margin: 0; }
.acc-modal-invoice-no {
  font-size: 13px; font-weight: 700; color: var(--accent);
  font-family: 'JetBrains Mono', monospace; margin-left: 10px;
}
.acc-modal-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text-soft); padding: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.acc-modal-close:hover { color: var(--text); }
.acc-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.acc-modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0;
}

/* ── Modal Form Fields ── */
.acc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.acc-form-grid .acc-full { grid-column: 1 / -1; }
.acc-form-grid .acc-third { grid-column: span 1; }

.acc-field { display: flex; flex-direction: column; gap: 5px; }
.acc-field label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-faint);
}
.acc-field input, .acc-field select, .acc-field textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 12.5px;
  outline: none; transition: 0.15s; font-family: inherit;
}
.acc-field input:focus, .acc-field select:focus, .acc-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,76,122,.1);
}
.acc-field textarea { resize: vertical; min-height: 70px; }

/* ── Items Table (inside modal) ── */
.acc-items-section { margin-top: 4px; }
.acc-items-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-faint); margin-bottom: 8px;
}
.acc-items-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.acc-items-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 600px; }
.acc-items-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); padding: 9px 10px; background: var(--surface-soft);
  border-bottom: 1px solid var(--border); text-align: left;
}
.acc-items-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.acc-items-table tr:last-child td { border-bottom: none; }
.acc-item-input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px; outline: none;
}
.acc-item-input:focus { border-color: var(--accent); }
.acc-item-line-total { font-weight: 700; text-align: right; white-space: nowrap; color: var(--text); font-size: 12px; }
.acc-remove-item-btn {
  background: none; border: 1px solid var(--border); color: var(--danger);
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; transition: 0.15s;
}
.acc-remove-item-btn:hover { background: var(--danger-bg); border-color: var(--danger); }

.acc-add-item-btn {
  margin-top: 4px; padding: 7px 16px; background: var(--surface-soft);
  border: 1px dashed var(--border-strong); border-radius: 8px; font-size: 12px;
  font-weight: 600; cursor: pointer; color: var(--text-soft); transition: 0.15s;
}
.acc-add-item-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ── Totals Row ── */
.acc-totals-row {
  display: flex; justify-content: flex-end; gap: 24px; padding: 12px 16px;
  background: var(--surface-soft); border: 1px solid var(--border); border-radius: 10px;
  margin-top: 12px; flex-wrap: wrap;
}
.acc-total-item { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.acc-total-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 700; }
.acc-total-value { font-size: 15px; font-weight: 700; color: var(--text); }
.acc-total-value.acc-grand { font-size: 18px; color: var(--accent); }

/* ── Reports ── */
.acc-report-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.acc-report-section-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.acc-report-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }

/* VAT Table */
.acc-vat-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.acc-vat-controls label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.acc-vat-month-picker {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 12px; outline: none;
}
.acc-vat-month-picker:focus { border-color: var(--accent); }
.acc-vat-net-badge {
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}

.acc-vat-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acc-vat-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint);
  padding: 10px 12px; background: var(--surface-soft); border-bottom: 1px solid var(--border); text-align: left;
}
.acc-vat-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.acc-vat-table tr:last-child td { border-bottom: none; }
.acc-vat-total-row td { background: var(--surface-soft); }
.acc-vat-positive { color: var(--ok); }
.acc-vat-negative { color: var(--danger); }

/* Alacak/Borç Summary */
.acc-ab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.acc-ab-card {
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
}
.acc-ab-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 700; margin-bottom: 8px; }
.acc-rpt-value { font-size: 20px; font-weight: 700; color: var(--text); }
.acc-rpt-positive { color: var(--ok); }
.acc-rpt-negative { color: var(--danger); }

/* Trend Chart */
.acc-chart-legend { display: flex; gap: 16px; margin-bottom: 12px; }
.acc-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.acc-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.acc-legend-dot.acc-dot-sales    { background: var(--accent); }
.acc-legend-dot.acc-dot-purchase { background: #f97316; }

.acc-chart-container {
  height: 140px; background: var(--surface-soft); border-radius: 10px;
  border: 1px solid var(--border); padding: 12px 8px 8px; overflow: hidden;
}
#accTrendBars { display: flex; align-items: flex-end; gap: 8px; height: 100%; }
.acc-chart-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 4px;
}
.acc-chart-bars-wrap {
  display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center;
  flex: 1;
}
.acc-bar {
  width: 14px; border-radius: 4px 4px 0 0; transition: height 0.4s ease; min-height: 2px;
}
.acc-bar-sales    { background: var(--accent); }
.acc-bar-purchase { background: #f97316; }
.acc-chart-label { font-size: 10px; color: var(--text-faint); font-weight: 600; white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .acc-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .acc-form-grid { grid-template-columns: 1fr; }
  .acc-report-row { grid-template-columns: 1fr; }
  .acc-ab-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .acc-body { padding: 12px 12px 40px; }
  .acc-stat-grid { grid-template-columns: 1fr 1fr; }
  .acc-tabs { flex-direction: column; }
  .acc-filter-row { flex-direction: column; align-items: flex-start; }
  .acc-search-input { min-width: 100%; }
  .acc-totals-row { flex-direction: column; align-items: flex-start; }
  .acc-ab-grid { grid-template-columns: 1fr; }
  .acc-modal { max-height: 100vh; border-radius: 0; }
}

/* ════════════════════════════════════════════════════════════════
   PAZARLAMA MODULE — mk- prefix
   ════════════════════════════════════════════════════════════════ */

/* Shell & Body */
.mk-shell { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.mk-body  { flex: 1; overflow-y: auto; padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 20px; }

/* Stat Cards */
.mk-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.mk-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.mk-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.mk-stat-value { font-size: 28px; font-weight: 700; color: var(--text); }

/* Tabs */
.mk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.mk-tab {
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  border: none; background: none; color: var(--text-soft); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: 6px 6px 0 0; transition: color .15s, border-color .15s;
}
.mk-tab:hover { color: var(--text); }
.mk-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }

/* Filter Row */
.mk-filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.mk-filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.mk-filter-tab {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.mk-filter-tab:hover { background: var(--surface-soft); color: var(--text); }
.mk-filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mk-search-input {
  flex: 1; min-width: 220px; max-width: 360px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 13px; outline: none;
}
.mk-search-input:focus { border-color: var(--accent); }

/* Campaign Card Grid */
.mk-campaign-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.mk-empty { color: var(--text-faint); text-align: center; padding: 40px; font-size: 14px; }

/* Campaign Card */
.mk-campaign-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .15s;
}
.mk-campaign-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12); }

.mk-card-header { display: flex; flex-direction: column; gap: 6px; }
.mk-card-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-card-name { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.mk-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-card-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-card-no { font-size: 11px; font-family: var(--mono, monospace); color: var(--text-faint); }
.mk-card-dates { font-size: 11px; color: var(--text-soft); }

/* Channel Badge */
.mk-channel-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}

/* Campaign Status Badge */
.mk-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.mk-status-taslak     { background: #64748b22; color: #94a3b8; border: 1px solid #64748b44; }
.mk-status-aktif      { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; }
.mk-status-duraklatildi { background: #f9731622; color: #f97316; border: 1px solid #f9731644; }
.mk-status-tamamlandi { background: #6366f122; color: #6366f1; border: 1px solid #6366f144; }
.mk-status-iptal      { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }

/* Progress Bar */
.mk-budget-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-soft); flex-wrap: wrap; }
.mk-budget-label, .mk-budget-spent { flex: 1; min-width: 120px; }
.mk-budget-pct { font-weight: 700; font-size: 12px; color: var(--text-soft); }
.mk-budget-pct.mk-over { color: var(--danger, #ef4444); }
.mk-progress-bar {
  height: 6px; background: var(--surface-soft, #1e1e2e); border-radius: 999px; overflow: hidden;
}
.mk-progress-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.mk-fill-ok   { background: #22c55e; }
.mk-fill-over { background: #ef4444; }

/* Metric Row */
.mk-metric-row { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mk-metric-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; border-right: 1px solid var(--border);
}
.mk-metric-item:last-child { border-right: none; }
.mk-metric-val { font-size: 15px; font-weight: 700; color: var(--text); }
.mk-metric-lbl { font-size: 10px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.mk-roi-pos { color: #22c55e; }
.mk-roi-neg { color: #ef4444; }

/* Card Footer */
.mk-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.mk-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-card-actions { display: flex; gap: 6px; }

/* Quick Action Buttons */
.mk-quick-btn {
  padding: 5px 12px; font-size: 11px; font-weight: 700; border-radius: 6px;
  border: 1px solid transparent; cursor: pointer; transition: opacity .15s;
}
.mk-quick-btn:hover { opacity: .85; }
.mk-qbtn-start    { background: #22c55e22; color: #22c55e; border-color: #22c55e44; }
.mk-qbtn-pause    { background: #f9731622; color: #f97316; border-color: #f9731644; }
.mk-qbtn-complete { background: #6366f122; color: #6366f1; border-color: #6366f144; }

/* Small edit/delete within cards */
.mk-edit-btn { font-size: 12px; padding: 5px 12px; }
.mk-del-btn  { font-size: 12px; padding: 5px 12px; }

/* Lead Table */
.mk-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.mk-lead-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mk-lead-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint);
  padding: 10px 12px; background: var(--surface-soft); border-bottom: 1px solid var(--border); text-align: left;
  white-space: nowrap;
}
.mk-lead-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mk-lead-table tr:last-child td { border-bottom: none; }
.mk-lead-table tr:hover td { background: var(--surface-soft); }
.mk-table-empty { text-align: center; color: var(--text-faint); padding: 32px 12px; }
.mk-mono { font-family: var(--mono, monospace); font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.mk-lead-name { font-weight: 600; color: var(--text); }
.mk-lead-sub  { font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.mk-actions-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Lead Status Badge */
.mk-lead-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.mk-lead-yeni      { background: #3b82f622; color: #3b82f6; border: 1px solid #3b82f644; }
.mk-lead-iletisim  { background: #eab30822; color: #eab308; border: 1px solid #eab30844; }
.mk-lead-nitelikli { background: #8b5cf622; color: #8b5cf6; border: 1px solid #8b5cf644; }
.mk-lead-teklif    { background: #f9731622; color: #f97316; border: 1px solid #f9731644; }
.mk-lead-kazanildi { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; }
.mk-lead-kaybedildi { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }

/* Report Cards */
.mk-report-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.mk-report-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* Summary Grid */
.mk-summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mk-summary-item {
  background: var(--surface-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; text-align: center;
}
.mk-summary-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 6px; }
.mk-summary-value { font-size: 20px; font-weight: 700; color: var(--text); }

/* Lead Funnel */
.mk-funnel { display: flex; flex-direction: column; gap: 4px; }
.mk-funnel-row { display: flex; flex-direction: column; gap: 4px; }
.mk-funnel-conv { font-size: 11px; color: var(--text-faint); padding-left: 120px; font-style: italic; }
.mk-funnel-bar-wrap { display: flex; align-items: center; gap: 10px; }
.mk-funnel-label { font-size: 12px; font-weight: 600; color: var(--text-soft); width: 110px; text-align: right; flex-shrink: 0; }
.mk-funnel-bar {
  height: 28px; background: var(--accent); border-radius: 4px;
  display: flex; align-items: center; padding: 0 10px;
  min-width: 40px; transition: width .4s ease;
}
.mk-funnel-count { font-size: 13px; font-weight: 700; color: #fff; }

/* Trend Chart */
.mk-chart-legend { display: flex; gap: 16px; }
.mk-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.mk-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.mk-dot-spend   { background: var(--accent); }
.mk-dot-revenue { background: #22c55e; }
.mk-chart-container {
  height: 140px; background: var(--surface-soft); border-radius: 10px;
  border: 1px solid var(--border); padding: 12px 8px 8px; overflow: hidden;
}
.mk-trend-bars { display: flex; align-items: flex-end; gap: 8px; height: 100%; }
.mk-chart-col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 4px;
}
.mk-chart-bars-wrap {
  display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center;
  flex: 1;
}
.mk-bar { width: 14px; border-radius: 4px 4px 0 0; transition: height .4s ease; min-height: 2px; }
.mk-bar-spend   { background: var(--accent); }
.mk-bar-revenue { background: #22c55e; }
.mk-chart-label { font-size: 10px; color: var(--text-faint); font-weight: 600; white-space: nowrap; }

/* Modals */
.mk-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mk-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 680px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.mk-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.mk-modal-header h2 { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.mk-modal-no { font-size: 12px; font-family: var(--mono, monospace); color: var(--text-faint); padding: 2px 8px; background: var(--surface-soft); border-radius: 6px; }
.mk-modal-close { background: none; border: none; color: var(--text-soft); font-size: 22px; cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.mk-modal-close:hover { background: var(--surface-soft); color: var(--text); }
.mk-modal-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.mk-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); }

/* Form Grid */
.mk-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mk-field { display: flex; flex-direction: column; gap: 6px; }
.mk-field.mk-full { grid-column: 1 / -1; }
.mk-field label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.mk-field input,
.mk-field select,
.mk-field textarea {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-soft); color: var(--text); font-size: 13px; outline: none;
  font-family: inherit;
}
.mk-field input:focus,
.mk-field select:focus,
.mk-field textarea:focus { border-color: var(--accent); }
.mk-field textarea { resize: vertical; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .mk-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .mk-campaign-grid { grid-template-columns: 1fr; }
  .mk-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .mk-form-grid { grid-template-columns: 1fr; }
  .mk-field.mk-full { grid-column: 1; }
}
@media (max-width: 600px) {
  .mk-body { padding: 12px 12px 40px; }
  .mk-stat-grid { grid-template-columns: 1fr 1fr; }
  .mk-tabs { flex-wrap: wrap; }
  .mk-filter-row { flex-direction: column; align-items: flex-start; }
  .mk-search-input { min-width: 100%; max-width: 100%; }
  .mk-summary-grid { grid-template-columns: 1fr 1fr; }
  .mk-metric-row { flex-wrap: wrap; }
  .mk-modal { max-height: 100vh; border-radius: 0; }
  .mk-funnel-conv { padding-left: 90px; }
  .mk-funnel-label { width: 80px; font-size: 11px; }
}
}

/* ══════════════════════════════════════════════════════════
   İŞ GELİŞTİRME (BIZDEV) MODULE — bd- prefix
   ══════════════════════════════════════════════════════════ */

/* Shell */
#bizDevApp {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

/* Body */
.bd-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 40px;
}

/* Stats row */
.bd-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.bd-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.bd-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.bd-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tabs */
.bd-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.bd-tab {
  padding: 8px 20px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.bd-tab:hover { color: var(--text); }
.bd-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Filter row */
.bd-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bd-search-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  min-width: 200px;
  flex: 1;
}
.bd-search-input::placeholder { color: var(--muted); }
.bd-filter-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

/* ── Kanban Board ── */
.bd-kanban-board {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 400px;
}
.bd-kanban-col {
  flex: 0 0 220px;
  width: 220px;
  display: flex;
  flex-direction: column;
  background: var(--surface-soft, var(--surface));
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.bd-kanban-col-header {
  padding: 10px 12px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.bd-kcol-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.bd-kcol-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bd-kcol-count {
  font-size: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
}
.bd-kcol-total {
  font-size: 10px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.bd-kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bd-kanban-empty {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 8px;
}
.bd-kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}
.bd-kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.bd-kanban-card.overdue {
  border-left: 3px solid #ef4444;
}
.bd-kc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.3;
}
.bd-kc-company {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.bd-kc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.bd-kc-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.bd-kc-prob {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
}
.bd-kc-assigned {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 2px;
}
.bd-kc-date {
  font-size: 10px;
  color: var(--muted);
}
.bd-kc-date.bd-kc-overdue {
  color: #ef4444;
  font-weight: 600;
}

/* ── List Table ── */
.bd-list-table-wrap {
  overflow-x: auto;
}
.bd-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bd-list-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.bd-list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.bd-list-table tr:hover td { background: var(--surface-soft, var(--surface)); }
.bd-list-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.bd-opp-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Stage badge */
.bd-stage-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Type badge */
.bd-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: var(--surface-soft, #f3f4f6);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── Partner Grid ── */
.bd-partner-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.bd-part-status-tab {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.bd-part-status-tab:hover { color: var(--text); border-color: var(--accent); }
.bd-part-status-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.bd-partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.bd-partner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bd-pc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.bd-pc-company {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.bd-pc-badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  flex-shrink: 0;
}
.bd-tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.bd-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.bd-pc-type {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-soft, #f3f4f6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-block;
  align-self: flex-start;
}
.bd-pc-location, .bd-pc-contact, .bd-pc-revenue {
  font-size: 12px;
  color: var(--muted);
}
.bd-pc-renewal {
  font-size: 12px;
  color: var(--muted);
}
.bd-renewal-warning {
  color: #d97706;
  font-weight: 600;
}
.bd-pc-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Reports ── */
.bd-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.bd-report-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.bd-report-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.bd-rpt-stat {
  flex: 1;
  min-width: 120px;
  background: var(--surface-soft, #f9fafb);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.bd-rpt-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}
.bd-rpt-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* Pipeline bar chart */
.bd-pipeline-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.bd-pipeline-bar-label {
  width: 130px;
  font-size: 12px;
  color: var(--text);
  flex-shrink: 0;
  text-align: right;
}
.bd-pipeline-bar-track {
  flex: 1;
  height: 18px;
  background: var(--surface-soft, #f3f4f6);
  border-radius: 9px;
  overflow: hidden;
}
.bd-pipeline-bar {
  height: 100%;
  border-radius: 9px;
  transition: width 0.4s ease;
  min-width: 4px;
}
.bd-pipeline-bar-meta {
  width: 170px;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Source analysis table */
.bd-source-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bd-source-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.bd-source-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.bd-source-table tr:hover td { background: var(--surface-soft, #f9fafb); }

/* Renewal table */
.bd-renewal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bd-renewal-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.bd-renewal-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.bd-renewal-warning-row td { background: #fff7ed; }
[data-theme="dark"] .bd-renewal-warning-row td { background: #422006; }

/* Tier stats */
.bd-rpt-tier-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.bd-rpt-tier-stat {
  text-align: center;
  min-width: 80px;
}
.bd-rpt-tier-count {
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.bd-rpt-tier-name {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Modals ── */
.bd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bd-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.bd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.bd-modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.bd-modal-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.bd-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.bd-modal-close:hover { background: var(--surface-soft); color: var(--text); }
.bd-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}
.bd-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Form grid inside modal */
.bd-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.bd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bd-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bd-field input, .bd-field select, .bd-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.bd-field input:focus, .bd-field select:focus, .bd-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.bd-field textarea { resize: vertical; }
.bd-field.bd-full { grid-column: 1 / -1; }
.bd-section-title {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .bd-partner-grid { grid-template-columns: repeat(2, 1fr); }
  .bd-stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .bd-partner-grid { grid-template-columns: 1fr 1fr; }
  .bd-kanban-board { padding-bottom: 12px; }
  .bd-form-grid { grid-template-columns: 1fr; }
  .bd-field.bd-full { grid-column: 1; }
}
@media (max-width: 500px) {
  .bd-partner-grid { grid-template-columns: 1fr; }
  .bd-stat-row { grid-template-columns: 1fr 1fr; }
  .bd-body { padding: 12px 12px 40px; }
  .bd-pipeline-bar-label { width: 80px; font-size: 11px; }
  .bd-pipeline-bar-meta { width: 100px; }
}

/* ═══════════════════════════════════════════════════════════════
   İş Zekası & Analitik Module (bi-)
   ═══════════════════════════════════════════════════════════════ */

/* ── mod-back-btn / mod-action-btn ── */
.mod-back-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.mod-back-btn:hover { border-color: var(--accent); color: var(--accent); }
.mod-action-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
}
.mod-action-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Shell & Layout ── */
.bi-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  overflow: hidden;
}
.bi-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 40px;
}
.bi-section {
  display: block;
}

/* ── Tabs ── */
.bi-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.bi-tab {
  padding: 8px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s;
}
.bi-tab:hover { color: var(--text); }
.bi-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── KPI Grid ── */
.bi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.bi-kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.bi-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bi-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: break-all;
}
.bi-kpi-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.bi-kpi-pos { color: #27ae60; }
.bi-kpi-neg { color: var(--danger); }
.bi-kpi-warn { color: #f59e0b; }

/* ── Chart Section ── */
.bi-chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.bi-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.bi-chart-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  align-items: center;
}
.bi-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}
.bi-legend-income  { background: #27ae60; }
.bi-legend-expense { background: var(--danger); }

/* ── CSS Bar Chart ── */
.bi-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
}
.bi-chart-bars-12 {
  gap: 4px;
}
.bi-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.bi-chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  width: 100%;
  justify-content: center;
}
.bi-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
  cursor: default;
}
.bi-bar-income  { background: #27ae60; }
.bi-bar-expense { background: var(--danger); }
.bi-bar-a { background: var(--accent); }
.bi-bar-b { background: #f59e0b; }
.bi-chart-label {
  font-size: 9px;
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

/* ── Health Grid ── */
.bi-health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.bi-health-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.bi-health-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.bi-dot-green  { background: #27ae60; }
.bi-dot-yellow { background: #f59e0b; }
.bi-dot-red    { background: var(--danger); }
.bi-health-icon { font-size: 18px; }
.bi-health-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.bi-health-metric {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Two-column layout ── */
.bi-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ── Data Table ── */
.bi-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.bi-data-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.bi-data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.bi-data-table tr:last-child td { border-bottom: none; }
.bi-data-table tr:hover td { background: var(--border); }
.bi-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 12px;
  display: block;
}
td.bi-empty { text-align: center; }

/* ── Lead Funnel ── */
.bi-funnel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bi-funnel-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bi-funnel-conv {
  font-size: 10px;
  color: var(--muted);
  padding-left: 8px;
  height: 14px;
}
.bi-funnel-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bi-funnel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  width: 130px;
  flex-shrink: 0;
}
.bi-funnel-bar {
  background: var(--accent);
  border-radius: 4px;
  padding: 5px 10px;
  min-width: 40px;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
}
.bi-funnel-count {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ── Horizontal Bar Chart ── */
.bi-hbar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bi-hbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bi-hbar-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bi-hbar-track {
  flex: 1;
  background: var(--border);
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
}
.bi-hbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.bi-hbar-pos { background: #27ae60; }
.bi-hbar-neg { background: var(--danger); }
.bi-hbar-value {
  width: 60px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

/* ── Big Number ── */
.bi-big-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin: 12px 0;
}

/* ── Stat Pills ── */
.bi-stat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bi-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
}
.bi-pill-label {
  font-size: 11px;
  color: var(--muted);
}
.bi-pill-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.bi-pill-pos  { border-color: #27ae60; }
.bi-pill-neg  { border-color: var(--danger); }
.bi-pill-urgent  { border-color: var(--danger); }
.bi-pill-high    { border-color: #f59e0b; }
.bi-pill-normal  { border-color: var(--border-strong); }
.bi-pill-low     { border-color: var(--muted); }
.bi-pill-gold    { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.bi-pill-silver  { border-color: #94a3b8; background: rgba(148,163,184,0.08); }
.bi-pill-bronze  { border-color: #b45309; background: rgba(180,83,9,0.08); }

/* ── Low Stock Row ── */
.bi-low-stock-row td { color: var(--danger); }
.bi-low-stock-row { background: rgba(239, 68, 68, 0.04); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .bi-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .bi-health-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .bi-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .bi-health-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .bi-two-col { grid-template-columns: 1fr; }
  .bi-chart-bars-12 { gap: 2px; }
  .bi-bar { width: 10px; }
  .bi-body { padding: 12px 12px 40px; }
  .bi-funnel-label { width: 90px; }
  .bi-hbar-label { width: 90px; }
  .bi-tabs { padding: 10px 12px 0; gap: 2px; }
  .bi-tab { padding: 7px 10px; font-size: 12px; }
  .bi-kpi-grid-3 { grid-template-columns: 1fr 1fr; }
}
/* =========================================================================
   E-TICARET MODULE (ec- prefix)
   ========================================================================= */

/* Shell & Layout */
.ec-shell {
  padding: 20px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Stat Cards */
.ec-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.ec-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.ec-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.ec-stat-label {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 6px;
}

/* Tabs */
.ec-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.ec-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.15s, border-color 0.15s;
}
.ec-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.ec-tab:hover { color: var(--text); }

/* Toolbar */
.ec-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.ec-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ec-ftab {
  padding: 5px 13px;
  background: var(--neutral-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
  transition: all 0.15s;
}
.ec-ftab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.ec-search {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  min-width: 220px;
  margin-left: auto;
}

/* Table wrapper */
.ec-table-wrap {
  overflow-x: auto;
}
.ec-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 40px 0;
  font-size: 14px;
}

/* Order Table */
.ec-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ec-order-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ec-order-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ec-order-table tbody tr:hover { background: var(--surface-soft); }
.ec-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Status badges */
.ec-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ec-badge-blue    { background: #dbeafe; color: #1d4ed8; }
.ec-badge-indigo  { background: #e0e7ff; color: #4338ca; }
.ec-badge-yellow  { background: #fef9c3; color: #854d0e; }
.ec-badge-orange  { background: #ffedd5; color: #c2410c; }
.ec-badge-green   { background: var(--ok-bg); color: var(--ok); }
.ec-badge-gray    { background: var(--neutral-bg); color: var(--neutral); }
.ec-badge-red     { background: var(--danger-bg); color: var(--danger); }

/* Payment badge */
.ec-pay-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ec-pay-yellow { background: #fef9c3; color: #854d0e; }
.ec-pay-green  { background: var(--ok-bg); color: var(--ok); }
.ec-pay-red    { background: var(--danger-bg); color: var(--danger); }

/* Quick buttons */
.ec-quick-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
  background: var(--surface);
  color: var(--text);
}
.ec-quick-btn.approve  { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.ec-quick-btn.prepare  { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.ec-quick-btn.ship     { background: #ffedd5; color: #c2410c; border-color: #fdba74; }
.ec-quick-btn.deliver  { background: var(--ok-bg); color: var(--ok); border-color: #86efac; }
.ec-quick-btn.edit     { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ec-quick-btn.danger   { background: var(--danger-bg); color: var(--danger); border-color: #fca5a5; }
.ec-quick-btn:hover { filter: brightness(0.93); }

/* Inline cargo panel */
.ec-cargo-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.ec-cargo-panel strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.ec-cargo-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}
.ec-cargo-field { display: flex; flex-direction: column; gap: 4px; }
.ec-cargo-field label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.ec-cargo-field input, .ec-cargo-field select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  min-width: 160px;
}

/* Product grid */
.ec-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ec-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.ec-product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ec-product-img-wrap {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: var(--surface-soft);
  position: relative;
}
.ec-product-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.ec-product-img-fallback {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--neutral-bg);
  color: var(--text-faint);
}
.ec-product-info {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ec-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ec-product-name { font-weight: 700; font-size: 14px; color: var(--text); }
.ec-product-sku { font-size: 11px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.ec-product-cat small { font-size: 12px; color: var(--text-soft); }
.ec-product-price { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ec-margin-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.ec-margin-badge.positive { background: var(--ok-bg); color: var(--ok); }
.ec-margin-badge.negative { background: var(--danger-bg); color: var(--danger); }

/* Stock bar */
.ec-stock-row { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-soft); }
.ec-stock-low { color: var(--danger); font-weight: 600; }
.ec-stock-bar {
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.ec-stock-bar-fill {
  height: 100%;
  background: var(--ok);
  border-radius: 4px;
  transition: width 0.3s;
}
.ec-stock-bar-fill.low { background: var(--danger); }

/* Channel pills */
.ec-channel-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ec-channel-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Product actions */
.ec-product-actions {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--surface-soft);
}

/* Customer Table */
.ec-customer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ec-customer-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.ec-customer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ec-customer-table tbody tr:hover { background: var(--surface-soft); }

/* Segment badges */
.ec-segment-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ec-seg-bireysel { background: #ede9fe; color: #6d28d9; }
.ec-seg-kurumsal { background: #dbeafe; color: #1d4ed8; }
.ec-seg-vip      { background: #fef3c7; color: #92400e; }
.ec-seg-toptan   { background: var(--ok-bg); color: var(--ok); }

/* Reports */
.ec-reports-body { display: flex; flex-direction: column; gap: 24px; }
.ec-report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.ec-report-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.ec-report-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.ec-report-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}
.ec-report-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.ec-report-stat-lbl { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* Bar chart */
.ec-chart-bars {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 160px;
  padding-top: 10px;
}
.ec-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.ec-chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  height: 120px;
  width: 100%;
  justify-content: center;
}
.ec-bar-revenue {
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  width: 80%;
  transition: height 0.3s;
  opacity: 0.85;
}
.ec-bar-revenue:hover { opacity: 1; }
.ec-chart-label { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.ec-chart-val { font-size: 10px; color: var(--text-faint); white-space: nowrap; }

/* Top products table */
.ec-top-products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ec-top-products-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}
.ec-top-products-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.ec-top-products-table tbody tr:hover { background: var(--surface-soft); }

/* Segment stats */
.ec-segment-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.ec-seg-stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
}
.ec-seg-stat-val { font-size: 28px; font-weight: 700; color: var(--text); }
.ec-seg-stat-label { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

/* Modal */
.ec-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 40px 16px;
  overflow-y: auto;
}
.ec-modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 760px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
}
.ec-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ec-modal-header h2 { font-size: 16px; font-weight: 700; margin: 0; }
.ec-modal-close {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-soft); line-height: 1;
}
.ec-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.ec-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form grid */
.ec-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 16px;
}
.ec-field { display: flex; flex-direction: column; gap: 5px; }
.ec-full { grid-column: 1 / -1; }
.ec-field label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.ec-field input, .ec-field select, .ec-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.ec-field textarea { resize: vertical; }
.ec-req { color: var(--danger); }
.ec-form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin: 16px 0 12px;
}
.ec-channel-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ec-channel-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

/* Order items table */
.ec-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}
.ec-items-table th {
  text-align: left;
  padding: 6px 8px;
  background: var(--surface-soft);
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}
.ec-items-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ec-items-table input, .ec-items-table select {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
}
.ec-item-line { font-weight: 600; white-space: nowrap; }
.ec-add-item-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}
.ec-add-item-btn:hover { background: var(--accent); color: #fff; }

/* Order summary */
.ec-order-summary {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 4px;
}
.ec-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-soft);
}
.ec-summary-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .ec-stats-row { grid-template-columns: repeat(2, 1fr); }
  .ec-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ec-stats-row { grid-template-columns: 1fr 1fr; }
  .ec-product-grid { grid-template-columns: 1fr; }
  .ec-form-grid { grid-template-columns: 1fr; }
  .ec-shell { padding: 12px 12px 40px; }
  .ec-tabs { gap: 2px; }
  .ec-tab { padding: 8px 12px; font-size: 12px; }
  .ec-ftab { padding: 4px 9px; font-size: 11px; }
  .ec-chart-bars { gap: 6px; }
  .ec-report-stat-row { gap: 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PROJE YÖNETİMİ  (pm-)
   ══════════════════════════════════════════════════════════════════════════════ */

/* Shell */
.pm-shell {
  padding: 20px 24px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Stat Cards ── */
.pm-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.pm-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
}
.pm-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.pm-stat-label {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 6px;
}

/* ── Tabs ── */
.pm-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.pm-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.pm-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Toolbar ── */
.pm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.pm-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pm-ftab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
  transition: background .15s, color .15s;
}
.pm-ftab.active,
.pm-ftab:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pm-search {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
}
.pm-select {
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  min-width: 160px;
}
.pm-view-toggle {
  display: flex;
  gap: 4px;
}
.pm-view-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-soft);
  transition: background .15s;
}
.pm-view-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Project Card Grid ── */
.pm-project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.pm-project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s;
}
.pm-project-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.pm-project-card.pm-overdue { border-left: 4px solid #ef4444; }

.pm-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pm-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.pm-card-badges { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

.pm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}
.pm-meta-item { white-space: nowrap; }

.pm-card-dates { font-size: 12px; color: var(--text-soft); }
.pm-card-dates.pm-date-overdue { color: #ef4444; }
.pm-overdue-tag {
  display: inline-block;
  margin-left: 6px;
  background: #ef444420;
  color: #ef4444;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

/* Progress bar */
.pm-progress-section { display: flex; flex-direction: column; gap: 4px; }
.pm-progress-label { font-size: 12px; color: var(--text-soft); }
.pm-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.pm-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 4px;
  transition: width .3s;
}

/* Budget bar */
.pm-budget-section { display: flex; flex-direction: column; gap: 4px; }
.pm-budget-label { font-size: 12px; color: var(--text-soft); }
.pm-budget-pct { font-weight: 600; }
.pm-budget-pct.pm-over { color: #ef4444; }
.pm-budget-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.pm-budget-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width .3s;
}
.pm-budget-fill.pm-over { background: #ef4444; }

.pm-task-count { font-size: 12px; color: var(--text-soft); }

/* Card footer */
.pm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.pm-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Small buttons ── */
.pm-btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.pm-btn-sm:hover { background: var(--border); }
.pm-btn-danger { color: #ef4444 !important; border-color: #ef444440 !important; }
.pm-btn-danger:hover { background: #ef444415 !important; }
.pm-btn-tasks { color: #3b82f6 !important; border-color: #3b82f640 !important; }
.pm-btn-tasks:hover { background: #3b82f615 !important; }
.pm-btn-advance { color: #8b5cf6 !important; border-color: #8b5cf640 !important; }
.pm-btn-complete { color: #22c55e !important; border-color: #22c55e40 !important; }

/* Quick action buttons */
.pm-btn-quick {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity .15s;
}
.pm-btn-quick:hover { opacity: .8; }
.pm-btn-start { background: #22c55e20; color: #22c55e; }
.pm-btn-complete { background: #3b82f620; color: #3b82f6; }
.pm-btn-wait { background: #f59e0b20; color: #f59e0b; }

/* ── Priority badges ── */
.pm-priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pm-priority-low  { background: #64748b20; color: #64748b; }
.pm-priority-mid  { background: #3b82f620; color: #3b82f6; }
.pm-priority-high { background: #f59e0b20; color: #f59e0b; }
.pm-priority-crit { background: #ef444420; color: #ef4444; }

/* ── Status badges ── */
.pm-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
/* Project statuses */
.pm-status-plan   { background: #64748b20; color: #64748b; }
.pm-status-active { background: #22c55e20; color: #22c55e; }
.pm-status-wait   { background: #f59e0b20; color: #f59e0b; }
.pm-status-done   { background: #3b82f620; color: #3b82f6; }
.pm-status-cancel { background: #ef444420; color: #ef4444; }
/* Task statuses */
.pm-tstatus-todo   { background: #64748b20; color: #64748b; }
.pm-tstatus-prog   { background: #3b82f620; color: #3b82f6; }
.pm-tstatus-rev    { background: #8b5cf620; color: #8b5cf6; }
.pm-tstatus-done   { background: #22c55e20; color: #22c55e; }
.pm-tstatus-cancel { background: #ef444420; color: #ef4444; }

/* ── Kanban Board ── */
.pm-kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 300px;
}
.pm-kanban-col {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.pm-kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pm-kanban-col-name { font-size: 13px; font-weight: 700; color: var(--text); }
.pm-kanban-col-count {
  background: var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-soft);
}
.pm-kanban-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pm-kanban-empty { font-size: 12px; color: var(--text-soft); text-align: center; padding: 20px 0; }
.pm-kanban-add {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-soft);
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s;
}
.pm-kanban-add:hover { background: var(--border); }

.pm-kanban-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .15s;
  border-left-width: 3px;
}
.pm-kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }

.pm-priority-low-border  { border-left-color: #64748b; }
.pm-priority-mid-border  { border-left-color: #3b82f6; }
.pm-priority-high-border { border-left-color: #f59e0b; }
.pm-priority-crit-border { border-left-color: #ef4444; }

.pm-kanban-card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.pm-kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-soft);
}
.pm-kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-soft);
}
.pm-project-pill {
  display: inline-block;
  background: #3b82f615;
  color: #3b82f6;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.pm-date-red { color: #ef4444 !important; font-weight: 600; }
.pm-hours-info { color: var(--text-soft); }

/* ── List Table ── */
.pm-list-table-wrap { overflow-x: auto; }
.pm-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pm-list-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--card);
  border-bottom: 2px solid var(--border);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.pm-list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.pm-list-table tr:hover td { background: var(--card); }
.pm-list-actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Timeline / Gantt ── */
.pm-timeline {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.pm-tl-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.pm-tl-name-head {
  width: 160px;
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  border-right: 1px solid var(--border);
}
.pm-tl-months { flex: 1; display: flex; }
.pm-tl-month {
  padding: 8px 4px;
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}
.pm-tl-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 36px;
  align-items: center;
}
.pm-tl-row:last-child { border-bottom: none; }
.pm-tl-name {
  width: 160px;
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  border-right: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-tl-bar-area {
  flex: 1;
  position: relative;
  height: 100%;
  min-height: 36px;
}
.pm-timeline-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 16px;
  border-radius: 4px;
  min-width: 4px;
}
.pm-tl-bar-active { background: #22c55e; }
.pm-tl-bar-plan   { background: #3b82f6; }
.pm-tl-bar-wait   { background: #f59e0b; }

/* ── Reports ── */
.pm-report-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.pm-report-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}
.pm-report-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.pm-report-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 20px;
  text-align: center;
  min-width: 100px;
  flex: 1;
}
.pm-report-val { font-size: 22px; font-weight: 700; color: var(--accent); }
.pm-report-lbl { font-size: 11px; color: var(--text-soft); margin-top: 4px; }
.pm-rc-active { border-top: 3px solid #22c55e; }
.pm-rc-done   { border-top: 3px solid #3b82f6; }
.pm-rc-overdue{ border-top: 3px solid #ef4444; }

.pm-report-section { margin-bottom: 20px; }
.pm-report-section h4 { font-size: 13px; font-weight: 600; color: var(--text-soft); margin: 0 0 8px; }

.pm-stat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-stat-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--text-soft);
}
.pm-stat-pill strong { color: var(--text); }

/* Assignee table */
.pm-assignee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pm-assignee-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-soft);
}
.pm-assignee-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* Budget table */
.pm-budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pm-budget-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-soft);
}
.pm-budget-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.pm-budget-pct-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.pm-budget-ok   { background: #22c55e20; color: #22c55e; }
.pm-budget-warn { background: #f59e0b20; color: #f59e0b; }
.pm-budget-over { background: #ef444420; color: #ef4444; }

/* ── Modal ── */
.pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.pm-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pm-modal-header h2 { margin: 0; font-size: 18px; }
.pm-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-soft);
  line-height: 1;
}
.pm-modal-body {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
}
.pm-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Form grid */
.pm-form-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.pm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pm-field { display: flex; flex-direction: column; gap: 5px; }
.pm-full { grid-column: 1 / -1; }
.pm-field label { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.pm-field input,
.pm-field select,
.pm-field textarea {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.pm-field textarea { resize: vertical; }
.pm-req { color: #ef4444; }

/* Empty state */
.pm-empty {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  padding: 40px 20px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .pm-stats-row { grid-template-columns: repeat(2, 1fr); }
  .pm-project-grid { grid-template-columns: 1fr; }
  .pm-form-grid { grid-template-columns: 1fr; }
  .pm-shell { padding: 12px 12px 40px; }
  .pm-tabs { gap: 2px; }
  .pm-tab { padding: 8px 12px; font-size: 12px; }
  .pm-kanban-board { gap: 10px; }
  .pm-kanban-col { flex: 0 0 200px; }
  .pm-tl-name { width: 100px; font-size: 11px; }
  .pm-tl-name-head { width: 100px; }
}

/* ════════════════════════════════════════════════════════════════════
   KALITE KONTROL (qc-) styles
   ════════════════════════════════════════════════════════════════════ */

/* Shell */
.qc-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* Stat Cards */
.qc-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.qc-stat-card {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: center;
}
.qc-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent, #7c6cf8);
  line-height: 1.1;
}
.qc-stat-label {
  font-size: 12px;
  color: var(--text-soft, #888);
  margin-top: 4px;
}

/* Main tabs */
.qc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border, #2a2a3e);
  padding-bottom: 0;
}
.qc-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text-soft, #888);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  border-radius: 6px 6px 0 0;
}
.qc-tab:hover { color: var(--text, #e0e0e0); }
.qc-tab.active {
  color: var(--accent, #7c6cf8);
  border-bottom-color: var(--accent, #7c6cf8);
}

/* Filter tabs (within sections) */
.qc-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.qc-ftab {
  padding: 6px 14px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--card-bg, #1a1a2e);
  color: var(--text-soft, #888);
  font-size: 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.qc-ftab:hover { background: var(--hover, #252540); color: var(--text, #e0e0e0); }
.qc-ftab.active {
  background: var(--accent, #7c6cf8);
  color: #fff;
  border-color: var(--accent, #7c6cf8);
}

/* Toolbar */
.qc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.qc-search {
  padding: 8px 12px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--input-bg, #12121e);
  color: var(--text, #e0e0e0);
  border-radius: 8px;
  font-size: 13px;
  min-width: 200px;
  flex: 1;
  max-width: 320px;
}
.qc-select {
  padding: 8px 10px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--input-bg, #12121e);
  color: var(--text, #e0e0e0);
  border-radius: 8px;
  font-size: 13px;
}

/* Table */
.qc-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border, #2a2a3e);
}
.qc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.qc-table thead th {
  background: var(--card-bg, #1a1a2e);
  color: var(--text-soft, #888);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #2a2a3e);
  white-space: nowrap;
}
.qc-table tbody tr {
  border-bottom: 1px solid var(--border, #2a2a3e);
  transition: background .12s;
}
.qc-table tbody tr:hover { background: var(--hover, #252540); }
.qc-table tbody tr:last-child { border-bottom: none; }
.qc-table td {
  padding: 10px 12px;
  color: var(--text, #e0e0e0);
  vertical-align: middle;
}
.qc-empty {
  text-align: center;
  color: var(--text-soft, #888);
  font-size: 14px;
  padding: 40px 20px;
}
.qc-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Action buttons inside table */
.qc-act-btn {
  padding: 5px 10px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--card-bg, #1a1a2e);
  color: var(--text, #e0e0e0);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.qc-act-btn:hover { background: var(--hover, #252540); }
.qc-act-btn.primary {
  background: var(--accent, #7c6cf8);
  color: #fff;
  border-color: var(--accent, #7c6cf8);
}
.qc-act-btn.primary:hover { opacity: .88; }
.qc-act-btn.danger { color: #e55; border-color: #e55; }
.qc-act-btn.danger:hover { background: #3a1515; }

/* ── Result badges (inspections) ── */
.qc-result-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.qc-result-gecti      { background: #1a3a1a; color: #4caf50; border: 1px solid #4caf50; }
.qc-result-kosullu    { background: #3a2e00; color: #ffc107; border: 1px solid #ffc107; }
.qc-result-basarisiz  { background: #3a1515; color: #ef5350; border: 1px solid #ef5350; }
.qc-result-beklemede  { background: #1a1a3a; color: #90a4ae; border: 1px solid #90a4ae; }

/* ── Severity badges (NCR) ── */
.qc-severity-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.qc-sev-minor  { background: #1a2a3a; color: #42a5f5; border: 1px solid #42a5f5; }
.qc-sev-major  { background: #3a2200; color: #ff9800; border: 1px solid #ff9800; }
.qc-sev-kritik { background: #3a1515; color: #ef5350; border: 1px solid #ef5350; }

/* ── NCR Status badges ── */
.qc-ncr-status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.qc-nst-acik       { background: #3a1515; color: #ef5350; border: 1px solid #ef5350; }
.qc-nst-analiz     { background: #3a2200; color: #ff9800; border: 1px solid #ff9800; }
.qc-nst-aksiyon    { background: #3a2e00; color: #ffc107; border: 1px solid #ffc107; }
.qc-nst-dogrulandi { background: #1a2a3a; color: #42a5f5; border: 1px solid #42a5f5; }
.qc-nst-kapatildi  { background: #1a3a1a; color: #4caf50; border: 1px solid #4caf50; }

/* ── Checklist card grid ── */
.qc-checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.qc-checklist-card {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qc-cl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.qc-cl-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #e0e0e0);
  flex: 1;
}
.qc-cl-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.qc-cls-aktif   { background: #1a3a1a; color: #4caf50; }
.qc-cls-taslak  { background: #3a2e00; color: #ffc107; }
.qc-cls-arsiv   { background: #2a2a2a; color: #888; }
.qc-cl-type-badge {
  font-size: 11px;
  color: var(--text-soft, #888);
  background: var(--hover, #252540);
  border-radius: 8px;
  padding: 2px 8px;
  display: inline-block;
  align-self: flex-start;
}
.qc-cl-item-count {
  font-size: 12px;
  color: var(--text-soft, #888);
}
.qc-item-preview {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-soft, #888);
  border-top: 1px solid var(--border, #2a2a3e);
  padding-top: 8px;
}
.qc-item-preview-li {
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-req-dot {
  color: #ef5350;
  font-weight: 700;
}
.qc-item-preview-more {
  font-style: italic;
  opacity: .7;
  padding-top: 2px;
}
.qc-cl-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border, #2a2a3e);
  padding-top: 10px;
  margin-top: auto;
}

/* ── Reports Panel ── */
.qc-reports-panel {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.qc-reports-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qc-report-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #e0e0e0);
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #2a2a3e);
}
.qc-report-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── KPI grid ── */
.qc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.qc-kpi-card {
  background: var(--hover, #252540);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.qc-kpi-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #e0e0e0);
}
.qc-kpi-label {
  font-size: 11px;
  color: var(--text-soft, #888);
  margin-top: 4px;
}
.qc-kpi-prev {
  font-size: 11px;
  color: var(--text-soft, #888);
  margin-top: 2px;
}
.qc-trend-up   { color: #4caf50; margin-left: 4px; }
.qc-trend-down { color: #ef5350; margin-left: 4px; }

/* ── CSS bar chart ── */
.qc-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px 0;
  height: 140px;
}
.qc-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.qc-bar-wrap {
  display: flex;
  align-items: flex-end;
  height: 90px;
  width: 100%;
  justify-content: center;
}
.qc-bar-defect {
  width: 70%;
  max-width: 40px;
  background: linear-gradient(to top, #7c6cf8, #a394fa);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height .3s;
}
.qc-chart-label {
  font-size: 11px;
  color: var(--text-soft, #888);
}
.qc-chart-val {
  font-size: 10px;
  color: var(--text-soft, #888);
}

/* ── Stat pills ── */
.qc-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qc-stat-pill {
  padding: 5px 12px;
  background: var(--hover, #252540);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text, #e0e0e0);
}
.qc-stat-pill strong { color: var(--accent, #7c6cf8); }

/* ── Category table ── */
.qc-category-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.qc-category-table th {
  background: var(--hover, #252540);
  color: var(--text-soft, #888);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border, #2a2a3e);
}
.qc-category-table td {
  padding: 8px 10px;
  color: var(--text, #e0e0e0);
  border-bottom: 1px solid var(--border, #2a2a3e);
}
.qc-category-table tr:last-child td { border-bottom: none; }
.qc-avg-close {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent, #7c6cf8);
  padding: 10px 0;
}

/* ── Modals ── */
.qc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.qc-modal {
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.qc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
}
.qc-modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text, #e0e0e0);
}
.qc-modal-close {
  background: none;
  border: none;
  color: var(--text-soft, #888);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.qc-modal-close:hover { color: var(--text, #e0e0e0); }
.qc-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.qc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border, #2a2a3e);
  flex-shrink: 0;
}
.qc-form-meta {
  font-size: 12px;
  color: var(--text-soft, #888);
  margin-bottom: 14px;
}
.qc-form-meta strong { color: var(--accent, #7c6cf8); }
.qc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.qc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qc-field.qc-full { grid-column: 1 / -1; }
.qc-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft, #888);
}
.qc-field input,
.qc-field select,
.qc-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--input-bg, #12121e);
  color: var(--text, #e0e0e0);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.qc-field textarea { resize: vertical; min-height: 70px; }
.qc-req { color: #ef5350; margin-left: 2px; }

/* Checklist item rows in modal */
.qc-checklist-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.qc-cl-item-num {
  font-size: 12px;
  color: var(--text-soft, #888);
  width: 20px;
  flex-shrink: 0;
}
.qc-cl-item-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border, #2a2a3e);
  background: var(--input-bg, #12121e);
  color: var(--text, #e0e0e0);
  border-radius: 8px;
  font-size: 13px;
}
.qc-cl-req-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-soft, #888);
  white-space: nowrap;
  cursor: pointer;
}
.qc-cl-items-add {
  margin-top: 4px;
}

/* Reports button active state */
.mod-action-btn.active {
  background: var(--accent, #7c6cf8);
  color: #fff;
}

/* ── Responsive 900px ── */
@media (max-width: 900px) {
  .qc-stats-row { grid-template-columns: repeat(2, 1fr); }
  .qc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .qc-report-two-col { grid-template-columns: 1fr; }
  .qc-checklist-grid { grid-template-columns: 1fr; }
}

/* ── Responsive 600px ── */
@media (max-width: 600px) {
  .qc-stats-row { grid-template-columns: 1fr 1fr; }
  .qc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .qc-form-grid { grid-template-columns: 1fr; }
  .qc-shell { padding: 10px 10px 40px; }
  .qc-tabs { gap: 2px; }
  .qc-tab { padding: 8px 12px; font-size: 12px; }
  .qc-toolbar { flex-direction: column; align-items: flex-start; }
  .qc-search { max-width: 100%; }
  .qc-modal { max-width: 100%; }
  .qc-chart-bars { height: 110px; }
}

/* ================================================================
   DENETIM & UYUM -- au- prefix
   ================================================================ */

/* Shell */
.au-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Stat Grid */
.au-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.au-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.au-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.au-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tabs */
.au-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.au-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 6px 6px 0 0;
}
.au-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.au-tab.au-tab-active { color: var(--accent); border-bottom-color: var(--accent); }

/* Toolbar */
.au-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.au-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 14px;
}
.au-search:focus { outline: none; border-color: var(--accent); }

/* Filter Tabs */
.au-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.au-filter-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.au-filter-tab:hover { color: var(--text); border-color: var(--accent); }
.au-filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Table */
.au-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.au-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.au-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.au-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.au-table tr:last-child td { border-bottom: none; }
.au-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.au-mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }
.au-mono.small { font-size: 11px; }
.au-overdue { color: #e74c3c !important; font-weight: 600; }

/* Quick action buttons */
.au-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.au-quick-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.au-quick-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.au-btn-del:hover { background: #e74c3c; border-color: #e74c3c; }
.au-btn-finding:hover { background: #8e44ad; border-color: #8e44ad; }

/* Result Badges */
.au-result-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-result-green  { background: rgba(39,174,96,0.15);  color: #27ae60; }
.au-result-amber  { background: rgba(243,156,18,0.15); color: #f39c12; }
.au-result-red    { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.au-result-gray   { background: rgba(127,140,141,0.15); color: #7f8c8d; }

/* Audit Status Badges */
.au-audit-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-astatus-blue   { background: rgba(52,152,219,0.15);  color: #3498db; }
.au-astatus-yellow { background: rgba(243,156,18,0.15);  color: #f39c12; }
.au-astatus-green  { background: rgba(39,174,96,0.15);   color: #27ae60; }
.au-astatus-gray   { background: rgba(127,140,141,0.15); color: #7f8c8d; }

/* Req Card Grid */
.au-req-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.au-req-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.au-req-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.au-req-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.au-req-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.au-req-card-row {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
}
.au-req-label { font-weight: 600; color: var(--text); }
.au-req-reg { font-size: 11px; font-family: "JetBrains Mono", monospace; color: var(--accent); }
.au-req-evidence { font-size: 11px; font-style: italic; color: var(--text-muted); }
.au-req-card-actions { display: flex; gap: 8px; margin-top: 4px; }
.au-cat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(52,152,219,0.12);
  color: #3498db;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Req Status Badges */
.au-req-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-req-green  { background: rgba(39,174,96,0.15);   color: #27ae60; }
.au-req-amber  { background: rgba(243,156,18,0.15);  color: #f39c12; }
.au-req-red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.au-req-blue   { background: rgba(52,152,219,0.15);  color: #3498db; }
.au-req-gray   { background: rgba(127,140,141,0.15); color: #7f8c8d; }

/* Finding Type Badges */
.au-finding-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-ftype-red    { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.au-ftype-blue   { background: rgba(52,152,219,0.15); color: #3498db; }
.au-ftype-green  { background: rgba(39,174,96,0.15);  color: #27ae60; }
.au-ftype-purple { background: rgba(142,68,173,0.15); color: #8e44ad; }

/* Severity Badges */
.au-severity-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-sev-blue   { background: rgba(52,152,219,0.15);  color: #3498db; }
.au-sev-orange { background: rgba(230,126,34,0.15);  color: #e67e22; }
.au-sev-red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }

/* Finding Status Badges */
.au-finding-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.au-fstatus-red    { background: rgba(231,76,60,0.15);   color: #e74c3c; }
.au-fstatus-yellow { background: rgba(243,156,18,0.15);  color: #f39c12; }
.au-fstatus-blue   { background: rgba(52,152,219,0.15);  color: #3498db; }
.au-fstatus-green  { background: rgba(39,174,96,0.15);   color: #27ae60; }

/* Reports Panel */
.au-reports-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.au-reports-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Score Summary */
.au-score-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.au-big-score-card {
  background: var(--bg, #0c0c12);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.au-big-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}
.au-big-score-unit { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.au-big-score-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* Upcoming / Standard Table */
.au-upcoming-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.au-upcoming-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.au-upcoming-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.au-upcoming-table tr:last-child td { border-bottom: none; }
.au-upcoming-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Non-compliant List */
.au-noncompliant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.au-noncompliant-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg, #0c0c12);
}
.au-noncompliant-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.au-noncompliant-title { font-size: 13px; font-weight: 600; color: var(--text); }
.au-noncompliant-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Bar Chart */
.au-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 140px;
  padding-top: 16px;
}
.au-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.au-chart-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  width: 100%;
}
.au-bar-finding {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.3s;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.au-bar-val {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding-top: 3px;
}
.au-chart-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

/* Modals */
.au-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.au-modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.au-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.au-modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; }
.au-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0 4px;
}
.au-modal-close:hover { color: var(--text); }
.au-modal-body { padding: 20px 24px; flex: 1; overflow-y: auto; }
.au-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.au-form-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-family: "JetBrains Mono", monospace;
}
.au-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.au-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.au-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.au-field input, .au-field select, .au-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg, #0c0c12);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.au-field input:focus, .au-field select:focus, .au-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.au-full { grid-column: 1 / -1; }
.au-req-marker { color: #e74c3c; margin-left: 2px; }

/* Responsive 900px */
@media (max-width: 900px) {
  .au-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .au-req-grid  { grid-template-columns: 1fr; }
  .au-score-summary { grid-template-columns: repeat(2, 1fr); }
}

/* Responsive 600px */
@media (max-width: 600px) {
  .au-stat-grid { grid-template-columns: 1fr 1fr; }
  .au-shell { padding: 10px 10px 40px; }
  .au-tabs { gap: 2px; }
  .au-tab { padding: 8px 10px; font-size: 12px; }
  .au-toolbar { flex-direction: column; align-items: flex-start; }
  .au-search { max-width: 100%; }
  .au-modal { max-width: 100%; }
  .au-form-grid { grid-template-columns: 1fr; }
  .au-score-summary { grid-template-columns: 1fr 1fr; }
  .au-chart-bars { height: 100px; }
}

/* ========================================================================= */
/* SISTEM AYARLARI (settings.js) — st- prefix                                */
/* ========================================================================= */

.st-shell {
  padding: 20px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.st-welcome-bar {
  background: var(--bg-secondary, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

/* Tabs */
.st-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border, rgba(255,255,255,0.1));
  padding-bottom: 0;
}

.st-tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted, #888);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.st-tab:hover {
  color: var(--text);
  background: var(--bg-secondary, rgba(255,255,255,0.05));
}

.st-tab.active {
  color: #a78bfa;
  border-bottom: 3px solid #a78bfa;
  background: var(--bg-secondary, rgba(167,139,250,0.08));
}

/* Section */
.st-section {
  padding: 8px 0 24px;
}

.st-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #888);
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}

/* Form grid */
.st-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.st-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.st-form-group--full {
  grid-column: 1 / -1;
}

.st-form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.st-form-input,
.st-form-select,
.st-form-textarea {
  background: var(--bg, #1a1a2e);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 8px;
  color: var(--text, #fff);
  font-size: 14px;
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
  font-family: inherit;
}

.st-form-input:focus,
.st-form-select:focus,
.st-form-textarea:focus {
  outline: none;
  border-color: #a78bfa;
}

.st-form-textarea {
  resize: vertical;
  min-height: 80px;
}

.st-form-select {
  appearance: auto;
}

/* Logo preview */
.st-logo-preview {
  margin-bottom: 20px;
  width: 120px;
  height: 80px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, rgba(255,255,255,0.04));
}

.st-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Module toggle list */
.st-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 520px;
}

.st-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  transition: background 0.2s;
}

.st-toggle-row:hover {
  background: var(--bg-secondary, rgba(255,255,255,0.07));
}

.st-toggle-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.st-toggle-name {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

/* CSS toggle switch */
.st-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.st-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.st-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border, rgba(255,255,255,0.15));
  border-radius: 24px;
  transition: 0.25s;
}

.st-toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.st-toggle input:checked + .st-toggle-slider {
  background: #a78bfa;
}

.st-toggle input:checked + .st-toggle-slider:before {
  transform: translateX(20px);
}

.st-toggle input:disabled + .st-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* About card */
.st-about-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-secondary, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 16px;
}

.st-about-logo {
  font-size: 56px;
  margin-bottom: 12px;
}

.st-about-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.st-about-version {
  font-size: 13px;
  color: var(--text-muted, #888);
  margin-bottom: 18px;
}

.st-about-desc {
  font-size: 14px;
  color: var(--text-muted, #aaa);
  line-height: 1.6;
  margin-bottom: 24px;
}

.st-about-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.st-about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.st-about-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #a78bfa;
}

.st-about-stat-label {
  font-size: 11px;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.st-tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 24px;
}

.st-tech-badge {
  padding: 5px 14px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
}

.st-about-dev-note {
  font-size: 13px;
  color: var(--text-muted, #999);
  margin-bottom: 20px;
}

.st-about-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  color: var(--text-muted, #777);
  font-size: 12px;
}

/* Toast */
.st-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #22c55e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: opacity 0.4s;
}

/* Responsive */
@media (max-width: 700px) {
  .st-form-grid { grid-template-columns: 1fr; }
  .st-form-group--full { grid-column: 1; }
  .st-shell { padding: 12px 12px 60px; }
  .st-tabs { gap: 2px; }
  .st-tab { padding: 8px 10px; font-size: 12px; }
  .st-about-card { padding: 20px 14px; }
  .st-about-stats { gap: 16px; }
}

/* =========================================================================
   MATRIX SEARCH
   ========================================================================= */
.mx-search-wrap {
  width: 100%;
  margin: 0 0 20px;
  position: relative;
}
.mx-search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.mx-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mx-search-icon { font-size: 16px; color: var(--text-faint); flex-shrink: 0; }
.mx-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  padding: 13px 0;
  font-family: inherit;
}
.mx-search-input::placeholder { color: var(--text-faint); }
.mx-search-clear {
  border: none; background: none; cursor: pointer;
  color: var(--text-faint); font-size: 14px; padding: 4px;
  border-radius: 50%; line-height: 1;
  transition: color .15s;
}
.mx-search-clear:hover { color: var(--text); }

.mx-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 100;
}
.mx-results-label {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mx-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .15s;
  border-top: 1px solid var(--border);
}
.mx-result-item:first-of-type { border-top: none; }
.mx-result-item:hover { background: var(--accent-soft); }
.mx-result-icon { font-size: 22px; flex-shrink: 0; width: 32px; text-align: center; }
.mx-result-body { flex: 1; min-width: 0; }
.mx-result-title { font-size: 14px; font-weight: 600; color: var(--text); }
.mx-result-desc  { font-size: 12px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-result-arrow { color: var(--text-faint); font-size: 13px; flex-shrink: 0; }
.mx-no-result    { padding: 16px; text-align: center; color: var(--text-soft); font-size: 13px; }

/* Dim non-matching cards */
.matrix-card.mx-dim {
  opacity: .25;
  pointer-events: none;
  filter: grayscale(.6);
  transform: scale(.97);
}

/* =========================================================================
   MATRIX QUOTE BLOCK
   ========================================================================= */
.mx-quote-block {
  width: 100%;
  margin: 0 0 20px;
  padding: 0 20px;
  height: 128px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.mx-quote-mark {
  font-size: 38px;
  line-height: 1;
  color: var(--accent);
  opacity: .15;
  font-family: Georgia, serif;
  flex-shrink: 0;
  user-select: none;
}
.mx-quote-content { flex: 1; min-width: 0; }
.mx-quote-text {
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  line-height: 1.35;
  transition: opacity .6s ease;
  letter-spacing: -.01em;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.mx-quote-text.fading { opacity: 0; }
.mx-quote-author {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: opacity .6s ease;
  white-space: nowrap;
}
.mx-quote-author.fading { opacity: 0; }
.mx-quote-nav { display: none; }
.mx-quote-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.mx-quote-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}
