/* ============================================================
   Bi Dünya Yönetim Paneli — Tasarım Sistemi
   Renk: koyu petrol yeşili + sıcak nötrler. Derinlik gölgeyle
   değil ince çizgi ve hiyerarşiyle verilir.
   ============================================================ */

:root {
  --bg:        #f4f5f2;
  --surface:   #ffffff;
  --ink:       #1c2420;
  --ink-soft:  #3d4a44;
  --muted:     #6d7a73;
  --line:      #e3e7e1;
  --line-soft: #edf0ec;

  --brand:       #1e5b4b;
  --brand-hover: #174a3d;
  --brand-soft:  #e8f1ed;
  --brand-ink:   #ffffff;

  --side-bg:   #12251f;
  --side-ink:  #b9c8c1;
  --side-hi:   #ffffff;
  --side-line: #22382f;

  --danger:      #b3372e;
  --danger-soft: #f9ebea;
  --warn:        #9a6a1c;
  --warn-soft:   #f9f1e2;
  --ok:          #2e7d4f;
  --ok-soft:     #e9f4ee;
  --info:        #2f5f8f;
  --info-soft:   #e9f0f7;

  --radius:    10px;
  --radius-sm: 7px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 19px; height: 19px; flex: none; vertical-align: -4px; }
.icon-xl { width: 44px; height: 44px; color: var(--muted); }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }

code.code-chip {
  font-size: .78rem; background: var(--line-soft); border-radius: 4px;
  padding: 1px 6px; color: var(--ink-soft);
}

/* ---------- Uygulama iskeleti ---------- */

.app { display: flex; min-height: 100vh; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.content { padding: 26px 30px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ---------- Kenar çubuğu ---------- */

.sidebar {
  width: 244px; flex: none; background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 18px 16px; border-bottom: 1px solid var(--side-line);
}

.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark-lg { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 12px; }

.brand-name { color: var(--side-hi); font-weight: 650; font-size: .95rem; line-height: 1.2; }
.brand-name small { display: block; color: var(--side-ink); font-weight: 400; font-size: .72rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }

.nav-label {
  display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: #5f7168; padding: 12px 10px 5px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--side-ink); font-size: .9rem; margin-bottom: 1px;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--side-hi); }
.nav-item.is-active { background: var(--brand); color: #fff; }
.nav-item .icon { opacity: .85; }

.nav-badge {
  margin-left: auto; background: #cf5f47; color: #fff; font-size: .68rem;
  min-width: 18px; height: 18px; border-radius: 9px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

.sidebar-footer {
  border-top: 1px solid var(--side-line); padding: 12px;
  display: flex; align-items: center; gap: 6px;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border-radius: var(--radius-sm); padding: 6px; }
.sidebar-user:hover { background: rgba(255,255,255,.05); }

.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: #2c463c; color: #dfe9e4; font-weight: 600; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
}

.sidebar-user-info { min-width: 0; line-height: 1.25; }
.sidebar-user-info strong { display: block; color: var(--side-hi); font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info small { color: var(--side-ink); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.logout-form { flex: none; }
.sidebar-footer .icon-btn { color: var(--side-ink); }
.sidebar-footer .icon-btn:hover { color: #e08573; background: rgba(255,255,255,.05); }

/* ---------- Üst çubuk ---------- */

.topbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 0 22px; height: 56px; position: sticky; top: 0; z-index: 30;
}

.topbar-title { font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar-menu { display: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  position: relative;
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }

.bell-dot {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px;
  background: #cf5f47; border-radius: 50%; border: 2px solid var(--surface);
}

/* ---------- Sayfa başlığı ---------- */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}

.page-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.page-sub { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8rem; color: var(--muted); margin-bottom: 6px;
}
.back-link:hover { color: var(--brand); }
.back-link .icon { width: 15px; height: 15px; }

/* ---------- Butonlar ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  font-size: .86rem; font-weight: 600; font-family: var(--font);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}

.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: #c9d1ca; background: var(--line-soft); }

.btn-danger-ghost { background: var(--surface); border-color: var(--line); color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #e2beba; }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 11px; font-size: .8rem; }

/* ---------- Paneller ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
}

.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px; gap: 10px;
}
.panel-head h3 { font-size: .98rem; font-weight: 650; }
.panel-link { font-size: .8rem; color: var(--muted); font-weight: 500; }
.panel-link:hover { color: var(--brand); }
.panel-empty { color: var(--muted); font-size: .88rem; padding: 8px 0; }

/* ---------- Kokpit ---------- */

.ann-strip { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; }

.ann-chip {
  display: flex; align-items: center; gap: 10px; flex: none; max-width: 340px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 13px; color: var(--ink); font-size: .82rem;
}
.ann-chip:hover { border-color: #c9d1ca; }
.ann-chip.is-unread { border-left: 3px solid var(--brand); }
.ann-chip.is-urgent { border-left: 3px solid var(--danger); }

.ann-chip-type {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); flex: none;
}
.ann-chip.is-urgent .ann-chip-type { color: var(--danger); }
.ann-chip-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.ann-chip-date { color: var(--muted); font-size: .72rem; flex: none; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }

.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 1px; color: var(--ink);
}
.stat-card:hover { border-color: #c9d1ca; }
.stat-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .8rem; }
.stat-card.is-danger .stat-value { color: var(--danger); }
.stat-card.is-warn .stat-value { color: var(--warn); }

.dash-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; align-items: start; }

.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-stats > div { text-align: center; background: var(--line-soft); border-radius: var(--radius-sm); padding: 10px 4px; }
.mini-stats strong { display: block; font-size: 1.15rem; }
.mini-stats span { font-size: .7rem; color: var(--muted); }
.mini-stats .is-danger strong { color: var(--danger); }

/* ---------- Görev listeleri ---------- */

.task-list { list-style: none; }
.task-list li + li { border-top: 1px solid var(--line-soft); }

.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); }
.task-row:hover .task-row-main strong { color: var(--brand); }

.task-row-main { flex: 1; min-width: 0; line-height: 1.3; }
.task-row-main strong { display: block; font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row-main small { color: var(--muted); font-size: .74rem; }

.task-due { font-size: .76rem; color: var(--muted); flex: none; }
.task-due.is-late { color: var(--danger); font-weight: 600; }

.prio { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.prio-dusuk  { background: #b6c2bb; }
.prio-normal { background: #7fa896; }
.prio-yuksek { background: #d99a3d; }
.prio-kritik { background: #c4473d; }

/* ---------- Modül ızgarası ---------- */

.modules { margin-top: 26px; }
.module-group { margin-bottom: 24px; }

.module-group-title {
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 10px;
}

.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.module-grid-lists { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }

.module-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; min-height: 118px;
}
.module-card:hover { border-color: var(--brand); }

.module-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px;
}
.module-icon-lg { width: 52px; height: 52px; margin: 0 auto 10px; }
.module-icon-lg .icon { width: 26px; height: 26px; }

.module-name { font-weight: 650; font-size: .9rem; }
.module-desc { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.module-card.is-soon { opacity: .62; }
.module-card.is-soon:hover { border-color: var(--line); opacity: .8; }

.module-soon {
  position: absolute; top: 12px; right: 12px;
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--line-soft); color: var(--muted); border-radius: 5px; padding: 2px 7px;
}

/* ---------- Tablolar ---------- */

.table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; font-size: .86rem; }

.table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600; padding: 11px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}

.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbf9; }

.table tfoot td {
  padding: 11px 14px; border-top: 1px solid var(--line);
  background: #fafbf9; font-size: .86rem;
}

.table-plain { border: none; }
.table-plain th { padding: 8px 6px; }
.table-plain td { padding: 8px 6px; }

.cell-title { font-weight: 600; color: var(--ink); }
.cell-title:hover { color: var(--brand); }

.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); font-weight: 600; }
.detail-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Rozetler ---------- */

.badge {
  display: inline-block; font-size: .72rem; font-weight: 600;
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}

.badge-ok     { background: var(--ok-soft); color: var(--ok); }
.badge-muted  { background: var(--line-soft); color: var(--muted); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn   { background: var(--warn-soft); color: var(--warn); }
.badge-info   { background: var(--info-soft); color: var(--info); }
.badge-brand  { background: var(--brand-soft); color: var(--brand); }
.badge-purple { background: #f0e9f7; color: #6d4b96; }

.status-sirada     { background: var(--line-soft); color: var(--ink-soft); }
.status-aktif      { background: var(--info-soft); color: var(--info); }
.status-beklemede  { background: var(--warn-soft); color: var(--warn); }
.status-bloke      { background: var(--danger-soft); color: var(--danger); }
.status-onay       { background: #f0e9f7; color: #6d4b96; }
.status-tamamlandi { background: var(--ok-soft); color: var(--ok); }
.status-iptal      { background: var(--line-soft); color: var(--muted); }

.prio-badge-dusuk  { background: var(--line-soft); color: var(--muted); }
.prio-badge-normal { background: var(--brand-soft); color: var(--brand); }
.prio-badge-yuksek { background: var(--warn-soft); color: var(--warn); }
.prio-badge-kritik { background: var(--danger-soft); color: var(--danger); }

.ann-type-genel    { background: var(--line-soft); color: var(--ink-soft); }
.ann-type-birim    { background: var(--info-soft); color: var(--info); }
.ann-type-acil     { background: var(--danger-soft); color: var(--danger); }
.ann-type-kampanya { background: var(--warn-soft); color: var(--warn); }
.ann-type-proje    { background: var(--brand-soft); color: var(--brand); }

/* ---------- Sekmeler ---------- */

.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line);
  margin-bottom: 16px; overflow-x: auto;
}

.tab {
  padding: 8px 14px; font-size: .85rem; font-weight: 550; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }

/* ---------- Formlar ---------- */

.form-panel { max-width: 720px; }
.form-narrow { max-width: 460px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }

.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="date"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 9px 12px; font-size: .88rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,91,75,.12);
}

.field textarea { resize: vertical; }

.field-hint { display: block; color: var(--muted); font-size: .73rem; margin-top: 4px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { grid-template-columns: repeat(3, 1fr); }
.field-row-4 { grid-template-columns: repeat(4, 1fr); }

/* Geniş veri giriş formları (finans gibi çok alanlı ekranlar) */
.form-wide { max-width: none; }

/* Tablo hücresi içindeki tek butonluk formlar */
.inline-form { display: inline-block; margin-left: 4px; }

.field-check { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.field-check input { width: 16px; height: 16px; accent-color: var(--brand); }
.field-check span { font-size: .85rem; font-weight: 500; color: var(--ink-soft); margin: 0; }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- Duyurular ---------- */

.ann-list { list-style: none; }
.ann-list li { margin-bottom: 8px; }

.ann-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; color: var(--ink);
}
.ann-item:hover { border-color: #c9d1ca; }
.ann-item.is-unread { border-left: 3px solid var(--brand); }

.ann-item-main { flex: 1; min-width: 0; line-height: 1.35; }
.ann-item-main strong { display: block; font-size: .92rem; }
.ann-item-main small { color: var(--muted); font-size: .76rem; }

.ack-pill {
  flex: none; font-size: .7rem; font-weight: 700; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px; padding: 3px 9px;
}

.ann-body { font-size: .95rem; line-height: 1.65; }

.ack-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--warn-soft); border: 1px solid #ecd9b8; border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 18px; font-size: .88rem; flex-wrap: wrap;
}

.read-note { font-size: .8rem; margin-bottom: 16px; }
.read-list { list-style: none; columns: 2; font-size: .86rem; }
.read-list li { padding: 3px 0; }

/* ---------- Detay sayfaları ---------- */

.detail-columns { display: grid; grid-template-columns: 5fr 2fr; gap: 18px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { min-width: 0; }

.meta-list { font-size: .86rem; }
.meta-list dt { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 11px; }
.meta-list dt:first-child { margin-top: 0; }
.meta-list dd { margin-top: 2px; }

.prewrap { white-space: pre-wrap; word-wrap: break-word; font-size: .9rem; }

.checklist { list-style: none; }
.checklist li + li { border-top: 1px solid var(--line-soft); }

.check-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 2px; background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: .88rem; color: var(--ink); text-align: left;
}

.check-box {
  width: 18px; height: 18px; flex: none; border: 1.5px solid #b6c2bb; border-radius: 5px;
  position: relative;
}

.check-toggle.is-done .check-box { background: var(--brand); border-color: var(--brand); }
.check-toggle.is-done .check-box::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check-toggle.is-done .check-label { color: var(--muted); text-decoration: line-through; }

.comments { list-style: none; margin-bottom: 14px; }
.comments li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.comments li:last-child { border-bottom: none; }

.comment-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.comment-head strong { font-size: .84rem; }
.comment-head small { color: var(--muted); font-size: .72rem; }

.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea {
  flex: 1; padding: 9px 12px; font-size: .88rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--brand); }

.status-form .field { margin-bottom: 11px; }

/* ---------- Bildirimler ---------- */

.notif-list { list-style: none; }

.notif-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 15px; margin-bottom: 7px; font-size: .88rem;
}
.notif-item.is-unread { border-left: 3px solid var(--brand); font-weight: 550; }
.notif-item a { color: var(--ink); }
.notif-item a:hover { color: var(--brand); }
.notif-item small { color: var(--muted); flex: none; font-size: .74rem; }

/* ---------- Boş durumlar, uyarılar ---------- */

.empty-state {
  text-align: center; padding: 64px 20px; background: var(--surface);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state h2 { font-size: 1.1rem; margin: 12px 0 4px; }
.empty-state p { color: var(--muted); font-size: .88rem; max-width: 420px; margin: 0 auto 6px; }
.empty-state .btn { margin-top: 14px; }

.flash {
  border-radius: var(--radius-sm); padding: 11px 15px; margin-bottom: 16px;
  font-size: .87rem; font-weight: 500;
}
.flash-success { background: var(--ok-soft); color: var(--ok); border: 1px solid #cbe5d5; }
.flash-error   { background: var(--danger-soft); color: var(--danger); border: 1px solid #ecc8c4; }

.note-sm { font-size: .8rem; color: var(--muted); line-height: 1.55; }
.role-info { padding: 13px 16px; }
.role-panel .table-wrap { border: none; }
.role-panel select { padding: 5px 8px; font-size: .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-family: var(--font); }

/* ---------- Filtre çubuğu (liste ekranları) ---------- */

.filter-bar {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar .field { margin-bottom: 0; min-width: 150px; }
.filter-bar .field > span { font-size: .72rem; }
.filter-bar input, .filter-bar select { padding: 7px 10px; font-size: .84rem; }

/* ---------- Basit çubuk grafikler (bağımlılıksız) ---------- */

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; font-size: .82rem; }
.bar-label { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--line-soft); border-radius: 5px; height: 18px; overflow: hidden; }
.bar-fill { background: var(--brand); height: 100%; border-radius: 5px; min-width: 2px; }
.bar-fill.is-warn { background: #d99a3d; }
.bar-fill.is-danger { background: #c4473d; }
.bar-value { color: var(--muted); text-align: right; font-weight: 600; }

.bar-svg { width: 100%; height: 14px; display: block; background: var(--line-soft); border-radius: 5px; }
.bar-rect { fill: var(--brand); }
.bar-rect-warn { fill: #d99a3d; }
.bar-rect-danger { fill: #c4473d; }

/* ---------- Giriş ekranı ---------- */

.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--side-bg); padding: 20px;
}

.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 14px; padding: 38px 34px 30px;
}

.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand h1 { font-size: 1.3rem; margin-top: 12px; letter-spacing: -.01em; }
.auth-brand p { color: var(--muted); font-size: .84rem; }

.auth-form .field input { padding: 11px 13px; }
.auth-form .btn { margin-top: 4px; padding: 11px; }

.auth-note { text-align: center; color: var(--muted); font-size: .76rem; margin-top: 20px; }

/* ---------- Mobil ---------- */

.sidebar-overlay { display: none; }

@media (max-width: 960px) {
  .dash-columns, .detail-columns { grid-template-columns: 1fr; }
  .field-row, .field-row-3, .field-row-4 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 50px; }

  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-overlay.is-visible {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(10,20,16,.5);
  }

  .topbar-menu { display: inline-flex; }
  .read-list { columns: 1; }
}

/* ---------- Günlük özet ---------- */

.brief-headline h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.brief-para { font-size: .95rem; line-height: 1.7; color: var(--ink-soft); margin-bottom: 10px; }
.brief-para:last-child { margin-bottom: 0; }

.finding-list { list-style: none; }
.finding { padding: 12px 0 12px 12px; border-left: 3px solid var(--line); }
.finding + .finding { border-top: 1px solid var(--line-soft); }
.finding-kritik { border-left-color: var(--danger); }
.finding-uyari  { border-left-color: #d99a3d; }
.finding-bilgi  { border-left-color: var(--info); }
.finding-iyi    { border-left-color: var(--ok); }

.finding-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.finding-head strong { font-size: .9rem; font-weight: 650; }
.finding-detail { font-size: .84rem; color: var(--muted); line-height: 1.55; }
.finding-link { display: inline-block; font-size: .78rem; margin-top: 5px; }

.brief-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius); padding: 13px 18px; margin-bottom: 20px; color: var(--ink);
}
.brief-strip:hover { border-color: #c9d1ca; border-left-color: var(--brand); }
.brief-strip strong { font-size: .95rem; font-weight: 650; flex: 1; min-width: 200px; }
.brief-strip-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 3px 8px;
}
.brief-strip-go { font-size: .8rem; color: var(--muted); }

.ai-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.ai-form .field-check { margin-bottom: 14px; }

.form-hidden { display: none; }
.btn-push-left { margin-right: auto; }

/* ============================================================
   Asistan — sağ alt balon, kart ve sağ panel sohbet
   ============================================================ */

.asst { position: fixed; right: 22px; bottom: 22px; z-index: 60; }

.asst-bubble {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px 11px 15px; border: none; border-radius: 999px;
  background: var(--brand); color: #fff; font-family: var(--font);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 16px rgba(18,37,31,.22);
}
.asst-bubble:hover { background: var(--brand-hover); }
.asst-bubble .icon { width: 18px; height: 18px; }

/* Küçük kart */
.asst-card {
  width: 380px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(18,37,31,.18);
  display: flex; flex-direction: column;
}

.asst-card-head, .asst-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px 11px 15px; border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
}

.asst-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 650; color: var(--brand);
}
.asst-title .icon { width: 17px; height: 17px; }

.asst-close { margin-left: auto; width: 30px; height: 30px; }
.asst-close .icon { width: 16px; height: 16px; }

.asst-card-body {
  padding: 14px 15px; max-height: 46vh; overflow-y: auto;
  font-size: .87rem; line-height: 1.6;
}

.asst-hint { color: var(--muted); font-size: .82rem; line-height: 1.6; }

.asst-loading { color: var(--brand); font-size: .84rem; font-weight: 600; }

.asst-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.asst-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 5px 12px; font-size: .78rem; font-family: var(--font);
  cursor: pointer; text-align: left;
}
.asst-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.asst-q {
  font-weight: 650; color: var(--ink); margin-bottom: 9px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line-soft);
}

.asst-answer p { margin-bottom: 9px; white-space: pre-wrap; }
.asst-answer p:last-of-type { margin-bottom: 0; }

.asst-source {
  display: block; margin-top: 10px; font-size: .73rem; color: var(--muted);
  border-top: 1px solid var(--line-soft); padding-top: 7px;
}

.asst-more { margin-top: 12px; }

/* Giriş alanı */
.asst-form { border-top: 1px solid var(--line); padding: 11px 12px; background: var(--surface); }

.asst-form textarea {
  width: 100%; padding: 9px 11px; font-size: .86rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); resize: none;
}
.asst-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,91,75,.12);
}

.asst-form-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* Sağ panel */
.asst-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 70;
}

.asst-context {
  font-size: .76rem; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}

.asst-thread { flex: 1; overflow-y: auto; padding: 16px 15px; }

.asst-msg { margin-bottom: 14px; font-size: .87rem; line-height: 1.62; }

.asst-msg-user p {
  background: var(--brand); color: #fff; border-radius: 12px 12px 3px 12px;
  padding: 9px 13px; margin-left: 34px; white-space: pre-wrap;
}

.asst-msg-bot .asst-answer {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px 12px 12px 3px; padding: 11px 13px; margin-right: 20px;
}

.asst-msg.is-pending .asst-answer { color: var(--brand); font-weight: 600; }

.asst-panel-form { display: flex; align-items: flex-end; gap: 8px; }
.asst-panel-form textarea { flex: 1; }

/* Panel açıkken sayfa daralır (Shopify tarzı) */
body.asst-open .app { margin-right: 420px; }
body.asst-open .asst { right: 442px; }

/* Sayfa içine gömülü asistan bölümü (kokpit, veri analizi) */
.asst-inline { border-color: #cfe0d8; background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 62%); }
.asst-inline .panel-head h3 { display: inline-flex; align-items: center; gap: 7px; }
.asst-inline .panel-head h3 .icon { width: 17px; height: 17px; color: var(--brand); }
.asst-inline-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.asst-inline-note { font-size: .8rem; color: var(--muted); margin-top: 12px; }

@media (max-width: 1100px) {
  body.asst-open .app { margin-right: 0; }
  body.asst-open .asst { right: 22px; }
  .asst-panel { width: 100%; }
}

@media (max-width: 560px) {
  .asst { right: 14px; bottom: 14px; }
  .asst-card { width: calc(100vw - 28px); }
  .asst-bubble span { display: none; }
  .asst-bubble { padding: 13px; }
}

/* Yazdırma: asistan arayüzü kâğıda çıkmaz */
@media print {
  .asst, .asst-panel, .sidebar, .topbar { display: none !important; }
  body.asst-open .app { margin-right: 0; }
  .content { padding: 0; max-width: none; }
}

/* Asistan tam sayfa ve raporlar */
.asst-thread-page { max-height: 58vh; padding: 0 0 14px; }
.asst-form-page { border-top: 1px solid var(--line); padding: 14px 0 0; margin-top: 14px; }

.report-forms { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.report-module-form { display: flex; align-items: flex-end; gap: 8px; margin-left: auto; }
.report-module-form .field { margin-bottom: 0; min-width: 220px; }

.report-body { max-width: 820px; }
.report-head {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: var(--brand); margin: 20px 0 9px;
}
.report-body > .report-head:first-child { margin-top: 0; }
.report-para { font-size: .93rem; line-height: 1.72; color: var(--ink-soft); margin-bottom: 8px; }
.report-row {
  font-size: .82rem; line-height: 1.55; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; white-space: pre-wrap;
  padding: 2px 0; border-bottom: 1px solid var(--line-soft);
}

/* hidden niteliği display:flex'i ezmeli */
.asst-card[hidden], .asst-panel[hidden], .asst-bubble[hidden] { display: none; }

/* ---------- Gündeme al ---------- */

.agenda-add { position: relative; display: inline-block; }
.agenda-add > summary { list-style: none; cursor: pointer; }
.agenda-add > summary::-webkit-details-marker { display: none; }

.agenda-add-form {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  width: 260px; padding: 13px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(18,37,31,.14);
}
.agenda-add-form .field { margin-bottom: 10px; }
.agenda-add-form .field > span { font-size: .75rem; }

.agenda-rules { background: var(--brand-soft); border-color: #cfe0d8; }

.select-sm {
  padding: 4px 8px; font-size: .8rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}

/* Görev tanımı seçici */
.taskdef-picker { margin-bottom: 14px; }
.taskdef-primary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.taskdef-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.taskdef-chip.is-active:hover { background: var(--brand-hover); color: #fff; }

/* Çoklu bağlantı listesi */
.link-list { list-style: none; margin-bottom: 14px; }
.link-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.link-list li:last-child { border-bottom: none; }
.link-row { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; color: var(--ink); }
.link-row:hover .link-main strong { color: var(--brand); }
.link-row .icon { color: var(--muted); flex: none; }
.link-main { min-width: 0; line-height: 1.3; }
.link-main strong { display: block; font-size: .87rem; font-weight: 600; }
.link-main small { display: block; font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-add { border-top: 1px solid var(--line-soft); padding-top: 13px; }

/* ---------- Üretim paketi ---------- */

.tabs-sub { margin-top: -8px; margin-bottom: 18px; }
.tabs-sub .tab { font-size: .82rem; }

/* Üretim satırları (toplu üretimde model listesi) */
.prod-rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }

.prod-row-head, .prod-row {
  display: grid; grid-template-columns: 1fr 110px 130px 70px; gap: 10px;
  align-items: center; padding: 9px 12px;
}
.prod-row-head {
  background: var(--bg); border-bottom: 1px solid var(--line);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--muted);
}
.prod-row + .prod-row { border-top: 1px solid var(--line-soft); }

.prod-cell { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.prod-cell input, .prod-cell select {
  width: 100%; padding: 7px 10px; font-size: .84rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.prod-cell input:focus, .prod-cell select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,91,75,.12);
}
.prod-cell .prod-name[hidden] { display: none; }

.prod-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
#prodTotals { font-weight: 650; color: var(--ink-soft); }

/* Zincir iş akışı */
.sop-chain { list-style: none; position: relative; padding-left: 4px; }

.sop-step { display: flex; gap: 13px; padding-bottom: 18px; position: relative; }
.sop-step:last-child { padding-bottom: 0; }
/* Adımları birleştiren dikey çizgi */
.sop-step:not(:last-child)::before {
  content: ''; position: absolute; left: 6px; top: 18px; bottom: 0;
  width: 2px; background: var(--line);
}

.sop-dot {
  width: 14px; height: 14px; flex: none; border-radius: 50%; margin-top: 3px;
  background: var(--surface); border: 3px solid var(--line); z-index: 1;
}
.sop-step-tamamlandi .sop-dot { background: var(--ok); border-color: var(--ok); }
.sop-step-acik .sop-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30,91,75,.12); }

.sop-body { flex: 1; min-width: 0; }
.sop-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 3px; }
.sop-head strong { font-size: .9rem; font-weight: 650; }
.sop-desc { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.sop-meta { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.sop-task { display: inline-block; font-size: .78rem; margin-top: 5px; }

.sop-form { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.sop-form input[type="text"] {
  flex: 1; min-width: 160px; padding: 6px 10px; font-size: .82rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}
.sop-form input[type="text"]:focus { outline: none; border-color: var(--brand); }

.cell-danger { color: var(--danger); font-weight: 650; }

@media (max-width: 720px) {
  .prod-row-head { display: none; }
  .prod-row { grid-template-columns: 1fr; }
}

/* ---------- Depo yönetim ---------- */

.shelf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px;
}

.shelf-cell {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); min-width: 0;
}
.shelf-cell:hover { border-color: var(--brand); }
.shelf-cell.is-filled { background: var(--brand-soft); border-color: #cfe0d8; }
.shelf-cell.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,91,75,.12); }
.shelf-cell.is-backup { border-left: 3px solid var(--info); }

.shelf-cell-code { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.shelf-cell-label {
  font-size: .74rem; color: var(--ink-soft); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.shelf-cell-qty { font-size: .72rem; color: var(--muted); }

.shelf-code {
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  background: var(--line-soft); border-radius: 4px; padding: 2px 7px;
}

.shelf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shelf-chip {
  font-size: .78rem; font-weight: 600; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--muted);
}

.stat-card.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,91,75,.1); }

/* ---------- Performans ---------- */

.pie-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }

.pie { width: 150px; height: 150px; flex: none; transform: rotate(-90deg); }
.pie-slice { fill: none; stroke-width: 16; }

.pie-legend { list-style: none; flex: 1; min-width: 200px; }
.pie-legend li {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: .85rem; border-bottom: 1px solid var(--line-soft);
}
.pie-legend li:last-child { border-bottom: none; }
.pie-dot { width: 10px; height: 10px; flex: none; }
.pie-legend-name { flex: 1; min-width: 0; color: var(--ink-soft); }

.rank-cell { font-size: 1.05rem; font-weight: 700; width: 44px; text-align: center; }
tr.rank-top { background: var(--brand-soft); }
tr.rank-top .cell-title { font-weight: 700; }

.input-tiny {
  width: 62px; padding: 5px 8px; font-size: .82rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); text-align: right;
}
.input-tiny:focus { outline: none; border-color: var(--brand); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Rapor kısayolları */
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }

.shortcut-card {
  display: flex; align-items: center; gap: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.shortcut-card:hover { border-color: var(--brand); }
.shortcut-card > a { flex: 1; min-width: 0; color: var(--ink); line-height: 1.3; }
.shortcut-card strong { display: block; font-size: .88rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-card small { display: block; font-size: .74rem; color: var(--muted); }
.shortcut-card .icon-btn { width: 28px; height: 28px; }
.shortcut-card .icon-btn .icon { width: 14px; height: 14px; }

/* Ticari paket */
.bar-cell { width: 90px; padding-left: 0; padding-right: 0; }
.utm-cell { max-width: 340px; font-size: .78rem; word-break: break-all; }
.bar-rect-ok { fill: var(--ok); }
.bar-rect-danger { fill: var(--danger); }

/* ---------- SEO puan halkaları ---------- */

.score-row { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 6px; }

.score-ring { position: relative; width: 92px; text-align: center; }
.ring-svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring-ok { stroke: var(--ok); }
.ring-warn { stroke: #d99a3d; }
.ring-danger { stroke: var(--danger); }

.ring-value {
  position: absolute; top: 20px; left: 0; right: 0;
  font-size: 1.05rem; font-weight: 700; color: var(--ink);
}
.ring-label { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }

.stat-card.is-ok { border-color: #cbe5d5; }

/* Rakip analizi — iki katman ve gelişme çizelgesi */
.detail-layer {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 18px;
}
.detail-layer > summary {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; cursor: pointer; list-style: none;
}
.detail-layer > summary::-webkit-details-marker { display: none; }
.detail-layer > summary::before {
  content: '▸'; color: var(--brand); font-size: .9rem; margin-right: 2px;
}
.detail-layer[open] > summary::before { content: '▾'; }
.detail-layer > summary:hover .detail-layer-title { color: var(--brand); }
.detail-layer-title { font-size: .95rem; font-weight: 650; }
.detail-layer-body { padding: 0 20px 6px; border-top: 1px solid var(--line-soft); }
.detail-layer-body .panel { border: none; padding-left: 0; padding-right: 0; }

.two-forms { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.inline-row-form { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.inline-row-form select, .inline-row-form input[type="text"] {
  padding: 6px 10px; font-size: .83rem; font-family: var(--font);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.inline-row-form select:focus, .inline-row-form input:focus { outline: none; border-color: var(--brand); }

.chip-x {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: .95rem; line-height: 1; padding: 0 0 0 5px;
}
.chip-x:hover { color: var(--danger); }
.asst-chip .inline-form { display: inline; margin: 0; }

.agenda-add-wide { width: 340px; }

/* ---------- Kapasite huni ---------- */

.funnel { display: flex; flex-direction: column; gap: 13px; }
.funnel-row { display: flex; flex-direction: column; gap: 3px; }
.funnel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.funnel-label { font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.funnel-value { font-size: .88rem; font-variant-numeric: tabular-nums; }
.funnel-bar { width: 100%; height: 12px; display: block; }
.funnel-rect { fill: var(--brand); opacity: .82; }
.funnel-row:last-child .funnel-rect { fill: var(--ok); opacity: 1; }

/* Yol haritası aşamaları */
.phase-card {
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px;
}
.phase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.phase-head strong { font-size: .92rem; }
.phase-target { font-size: .88rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ---------- Cari Defteri ---------- */

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

/* Satış trendi */
.trend-svg { width: 100%; height: 96px; display: block; overflow: visible; }
.trend-line { fill: none; stroke: var(--brand); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.trend-dot { fill: var(--brand); }
.trend-axis {
  display: flex; justify-content: space-between;
  font-size: .7rem; color: var(--muted); margin-top: 4px;
}

/* Pipeline */
.pipe-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.pipe-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: .79rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.pipe-chip:hover { border-color: var(--brand); }
.pipe-chip strong { font-weight: 700; }
.pipe-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }

.pipe-onay-bekliyor  .pipe-dot { background: #d99a3d; }
.pipe-hazirlaniyor   .pipe-dot { background: var(--info); }
.pipe-teslim-edildi  .pipe-dot { background: var(--ok); }
.pipe-iptal          .pipe-dot { background: var(--muted); }

.pipe-bar { width: 100%; height: 10px; display: block; border-radius: 4px; overflow: hidden; }
.pipe-seg-onay-bekliyor { fill: #d99a3d; }
.pipe-seg-hazirlaniyor  { fill: var(--info); }
.pipe-seg-teslim-edildi { fill: var(--ok); }
.pipe-seg-iptal         { fill: #c8d0ca; }

/* Halka grafik */
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut { width: 128px; height: 128px; flex: none; transform: rotate(-90deg); }
.donut-hole { fill: none; stroke: var(--line-soft); stroke-width: 4; }
.donut-seg { fill: none; stroke-width: 4; }

.donut-tone-0, .legend-tone-0 { stroke: var(--brand); background: var(--brand); }
.donut-tone-1, .legend-tone-1 { stroke: var(--info);  background: var(--info); }
.donut-tone-2, .legend-tone-2 { stroke: #d99a3d;      background: #d99a3d; }
.donut-tone-3, .legend-tone-3 { stroke: var(--ok);    background: var(--ok); }
.donut-tone-4, .legend-tone-4 { stroke: #8b6bb1;      background: #8b6bb1; }
.donut-tone-5, .legend-tone-5 { stroke: var(--danger); background: var(--danger); }

.donut-legend { list-style: none; flex: 1; min-width: 150px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .81rem; }
.donut-legend .legend-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* Sekme sayacı */
.tab-count {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  font-size: .7rem; font-weight: 700; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
}
.tab.is-active .tab-count { background: var(--brand-soft); color: var(--brand); }

.cell-credit { color: var(--info); }

/* ── Yol haritası adım tablosu — satır içi atama ve sürükle-bırak ──
   Kaynak: 14.08.2026 ekran incelemesi (TALEPLER-6 §4)             */

.table-steps .col-grip { width: 28px; text-align: center; padding-right: 0; }

.grip {
    cursor: grab;
    color: var(--text-muted, #6b7a76);
    font-size: 15px;
    line-height: 1;
    user-select: none;
}
.grip:active { cursor: grabbing; }
.grip.is-locked { cursor: default; opacity: .35; }

.table-steps tr.is-dragging { opacity: .45; }
.table-steps tr.is-over td  { box-shadow: inset 0 2px 0 var(--brand, #1a7f5a); }

.select-xs,
.input-xs {
    font: inherit;
    font-size: 12px;
    padding: 2px 5px;
    border: 1px solid var(--border, #d8e0dd);
    border-radius: 5px;
    background: var(--surface, #fff);
    color: inherit;
    max-width: 140px;
}
.input-xs { max-width: 128px; }

.btn-xs {
    font-size: 12px;
    padding: 2px 8px;
    line-height: 1.5;
}

.table-steps .inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin: 2px 0 0;
}

.mt-1 { margin-top: 12px; }

/* Liste içi kayıt bağlantısı — isimden kaynağa gitme (TALEPLER-6 §10) */
.link-ref {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted var(--border-strong, #b9c6c2);
}
.link-ref:hover {
    color: var(--brand, #1a7f5a);
    border-bottom-color: currentColor;
}

/* ============================================================
   Süreç Yönetimi ekranları — doküman §3.6, §3.8, §3.9, §3.10, §3.11, §3.12
   ============================================================ */

/* §3.11 Önem / aciliyet matrisi — dört kutu */
.matrix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.matrix-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.matrix-box.is-danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.matrix-box.is-accent { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.matrix-box.is-warn   { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.matrix-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.matrix-box-head h4 { font-size: .95rem; font-weight: 650; }
.matrix-box-count { font-size: 1.35rem; font-weight: 700; }
.matrix-box-sub { color: var(--muted); font-size: .78rem; margin-bottom: 10px; }
.matrix-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.matrix-list li { font-size: .84rem; display: flex; gap: 8px; align-items: baseline; }
.matrix-list .code { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.matrix-axes { display: flex; gap: 6px; align-items: center; font-size: .75rem; color: var(--muted); }

/* §3.8 360° zaman çizelgesi */
.tl-stages { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.tl-stage { display: flex; align-items: center; gap: 6px; font-size: .85rem; padding: 5px 11px;
            border: 1px solid var(--line); border-radius: 999px; }
.tl-stage .mark { font-weight: 700; }
.tl-stage.done    { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tl-stage.current { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
                    font-weight: 600; }
.tl-stage.todo    { color: var(--muted); }

.tl-feed { list-style: none; display: flex; flex-direction: column; }
.tl-feed li { display: grid; grid-template-columns: 120px 92px minmax(0, 1fr); gap: 12px;
              padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tl-feed li:last-child { border-bottom: 0; }
.tl-when { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.tl-what { font-size: .88rem; }
.tl-detail { color: var(--muted); font-size: .8rem; margin-top: 2px; }

.tl-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tl-summary div { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.tl-summary dt { color: var(--muted); font-size: .74rem; margin-bottom: 3px; }
.tl-summary dd { font-size: .92rem; font-weight: 550; }

/* §3.10 tavsiye kutusu — sistemin gerekçesi */
.advice { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
          border-radius: 10px; padding: 13px 15px; background: color-mix(in srgb, var(--brand) 5%, transparent); }
.advice-head { font-weight: 650; font-size: .9rem; margin-bottom: 7px; }
.advice pre { white-space: pre-wrap; font: inherit; font-size: .84rem; color: var(--ink); line-height: 1.6; }
.advice-note { margin-top: 9px; font-size: .78rem; color: var(--muted); font-style: italic; }

/* §3.12 risk bantları ve ağırlık çubuğu */
.risk-bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; min-width: 90px; }
.risk-bar span { display: block; height: 100%; border-radius: 999px; }
.risk-dusuk  span { background: var(--ok); }
.risk-orta   span { background: var(--warn); }
.risk-yuksek span { background: var(--danger); }
.weight-sum { font-variant-numeric: tabular-nums; font-weight: 650; }
.weight-sum.bad { color: var(--danger); }
.weight-sum.good { color: var(--ok); }

/* §3.6 alan alarmı */
.alarm-row { background: color-mix(in srgb, var(--danger) 7%, transparent); }

@media (max-width: 900px) {
  .matrix-grid { grid-template-columns: minmax(0, 1fr); }
  .tl-feed li { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
