/* ============================================================
   Bil-Net Servis — Prototip Tasarım Sistemi
   "Atölye Konsolu": grafit + kemik beyazı + kehribar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Yüzeyler */
  --bg:        #EEEAE0;   /* sıcak kemik çalışma zemini */
  --surface:   #FBFAF6;
  --surface-2: #F4F1E8;
  --card:      #FFFFFF;

  /* Mürekkep */
  --ink:       #16181C;
  --ink-2:     #41464E;
  --ink-3:     #767C86;
  --line:      #E0DACB;
  --line-2:    #ECE7DB;

  /* Kenar çubuğu (grafit) */
  --rail:      #15181D;
  --rail-2:    #1D2228;
  --rail-ink:  #AEB4BD;
  --rail-ink-2:#6B727C;
  --rail-line: #2A2F37;

  /* Marka / vurgu */
  --amber:     #E8920F;
  --amber-soft:#FBE6C2;
  --amber-ink: #221606;
  --petrol:    #0E5B62;
  --petrol-2:  #0B4A50;

  /* Anlamsal */
  --green:  #2E7D54;  --green-bg:  #E1F0E6;
  --blue:   #2563B4;  --blue-bg:   #DEEAF8;
  --red:    #C0392B;  --red-bg:    #F8E2DE;
  --slate:  #5A6675;  --slate-bg:  #E7EAEE;

  --radius:   10px;
  --radius-s: 7px;
  --shadow:   0 1px 2px rgba(20,24,30,.05), 0 8px 24px -12px rgba(20,24,30,.18);
  --shadow-lg:0 24px 60px -24px rgba(20,24,30,.35);

  --rail-w: 232px;
  --h-top: 56px;
  --h-foot: 40px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono { font-family: 'IBM Plex Mono', monospace; font-feature-settings: 'tnum'; }
.num  { font-variant-numeric: tabular-nums; }

/* ============================================================ Layout */
.app { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

/* ---------- Kenar çubuğu ---------- */
.rail {
  background: var(--rail);
  color: var(--rail-ink);
  display: flex; flex-direction: column;
  border-right: 1px solid #000;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 18px 15px;
  border-bottom: 1px solid var(--rail-line);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--amber), #C9760A);
  display: grid; place-items: center;
  color: var(--amber-ink); font-family: 'Archivo'; font-weight: 800; font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 8px rgba(232,146,15,.35);
}
.brand-name { font-family: 'Archivo'; font-weight: 700; font-size: 15px; letter-spacing: .2px; color: #fff; line-height: 1.1; }
.brand-sub  { font-size: 10.5px; color: var(--rail-ink-2); letter-spacing: .9px; text-transform: uppercase; margin-top: 1px; }

.nav { padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--rail-ink-2); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: var(--rail-ink); text-decoration: none; font-size: 12.5px; font-weight: 500;
  position: relative; transition: background .14s, color .14s;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--rail-2); color: #fff; }
.nav-item.active { background: var(--rail-2); color: #fff; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  background: var(--amber); border-radius: 0 3px 3px 0;
}
.nav-item .badge {
  margin-left: auto; background: var(--amber); color: var(--amber-ink);
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 20px; font-family: 'IBM Plex Mono';
}
/* Açılır alt menü (drawer accordion) */
.nav-acc-btn { width: 100%; border: none; background: none; font-family: inherit; text-align: left; }
.nav-acc-btn .acc-cv { margin-left: auto; width: 14px; height: 14px; opacity: .7; transition: transform .18s; }
.nav-acc.open .acc-cv { transform: rotate(180deg); }
.nav-acc-body { display: none; flex-direction: column; gap: 2px; margin: 2px 0; }
.nav-acc.open .nav-acc-body { display: flex; }
.nav-sub { padding-left: 38px; font-size: 12px; color: var(--rail-ink-2); }
.nav-sub:hover { color: #fff; }
.nav-sub.active { background: var(--rail-2); color: #fff; }

.rail-foot { padding: 12px 14px; border-top: 1px solid var(--rail-line); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg,#384049,#222830); color:#fff;
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.rail-foot .who { font-size: 12px; color: #fff; font-weight: 600; }
.rail-foot .role { font-size: 10.5px; color: var(--rail-ink-2); }

/* ---------- Ana alan ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--h-top); flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  position: sticky; top: 0; z-index: 20;
}
.page-title { font-family: 'Archivo'; font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.page-title .crumb { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.search {
  margin-left: 8px; flex: 1; max-width: 440px; position: relative;
}
.search input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); padding: 0 12px 0 36px; font: inherit; color: var(--ink);
  transition: border .15s, box-shadow .15s, background .15s;
}
.search input:focus { outline: none; border-color: var(--amber); background:#fff; box-shadow: 0 0 0 3px var(--amber-soft); }
.search svg { position: absolute; left: 11px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.clock { text-align: right; line-height: 1.1; padding-right: 6px; }
.clock .t { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 13px; }
.clock .d { font-size: 10.5px; color: var(--ink-3); }

/* ---------- İçerik ---------- */
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.scroll  { overflow: auto; flex: 1; }
.pad { padding: 18px; }

/* ============================================================ Butonlar */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: background .14s, border .14s, transform .04s, box-shadow .14s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--surface-2); border-color: #d3ccba; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--petrol); border-color: var(--petrol-2); color: #fff; box-shadow: 0 2px 8px -2px rgba(14,91,98,.5); }
.btn-primary:hover { background: var(--petrol-2); }
.btn-accent { background: var(--amber); border-color: #cc7d0a; color: var(--amber-ink); box-shadow: 0 2px 8px -2px rgba(232,146,15,.55); }
.btn-accent:hover { background: #d9870d; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-icon { width: 34px; padding: 0; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ============================================================ Sekmeler */
.tabs { display: flex; gap: 2px; align-items: flex-end; }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--ink-3); border-radius: 9px 9px 0 0;
  border: 1px solid transparent; border-bottom: none; position: relative; top: 1px;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); background: var(--surface); border-color: var(--line); }
.tab .count { font-family: 'IBM Plex Mono'; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); padding: 1px 7px; border-radius: 20px; border:1px solid var(--line); }
.tab.active .count { background: var(--amber-soft); color: #8a5907; border-color: #f0d39a; }

/* ============================================================ Tablo / Grid */
.gridwrap { background: var(--surface); border: 1px solid var(--line); border-radius: 0 12px 12px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.gridtools { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.gridtools .sp { flex: 1; }
.tablescroll { overflow: auto; }
table.grid { width: 100%; min-width: 1730px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.grid thead th {
  position: sticky; top: 0; z-index: 5; background: var(--surface-2);
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3);
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.grid thead th.sortable { cursor: pointer; }
table.grid thead th .arrow { color: var(--amber); margin-left: 3px; }
.filterrow th { position: sticky; top: 33px; z-index: 4; background: var(--surface); padding: 5px 8px; border-bottom: 1px solid var(--line); }
.filterrow input {
  width: 100%; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
  font: inherit; font-size: 11.5px; padding: 0 7px; color: var(--ink);
}
.filterrow input:focus { outline: none; border-color: var(--amber); background:#fff; }
.filterrow input::placeholder { color: #b7b09e; }
table.grid tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.grid tbody tr { cursor: pointer; transition: background .1s; }
table.grid tbody tr:hover { background: var(--amber-soft); }
table.grid tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.cell-strong { font-weight: 600; }
.cell-muted { color: var(--ink-3); }
.barcode-cell { font-family: 'IBM Plex Mono'; font-size: 11.5px; color: var(--petrol); font-weight: 500; }
.tl-name { font-weight: 600; }
.tl-firm { font-size: 11px; color: var(--ink-3); }
.money { font-family: 'IBM Plex Mono'; text-align: right; font-variant-numeric: tabular-nums; }
.ucret-tutar { font-weight: 700; color: var(--green); }

/* Sol renk bandı (öncelik / dikkat) */
tr.row td:first-child { position: relative; }
tr.flag-warn  td:first-child::before,
tr.flag-new   td:first-child::before,
tr.flag-due   td:first-child::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; }
tr.flag-new  td:first-child::before { background: var(--blue); }
tr.flag-warn td:first-child::before { background: var(--amber); }
tr.flag-due  td:first-child::before { background: var(--red); }

/* ============================================================ Statü çipleri */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; line-height: 1.6;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* statü renkleri */
.st-yenikayit   { background:#DEEAF8; color:#1D4F8C; } .st-yenikayit .dot{background:#2563B4;}
.st-onarimda    { background:#FBE6C2; color:#8A5907; } .st-onarimda .dot{background:#E8920F;}
.st-test        { background:#E7E2F6; color:#564A9A; } .st-test .dot{background:#6C5CC4;}
.st-fiyatbek    { background:#FCE3D2; color:#9A4A1C; } .st-fiyatbek .dot{background:#E0701F;}
.st-fiyatalindi { background:#D8EEE2; color:#1F6B49; } .st-fiyatalindi .dot{background:#2E8B5C;}
.st-siparis     { background:#F3E0EF; color:#8A357C; } .st-siparis .dot{background:#B0489F;}
.st-parcabek    { background:#F6E7C9; color:#7A5410; } .st-parcabek .dot{background:#C99211;}
.st-gargidecek  { background:#D4EEF2; color:#176C77; } .st-gargidecek .dot{background:#1A93A1;}
.st-gargitti    { background:#CFE7EB; color:#0E5B62; } .st-gargitti .dot{background:#0E5B62;}
.st-tamam       { background:#DCF0E3; color:#1E6B43; } .st-tamam .dot{background:#2E7D54;}
.st-islemsiz    { background:#E7EAEE; color:#4E5A69; } .st-islemsiz .dot{background:#6B7686;}
.st-onarilamadi { background:#E2E6EA; color:#475160; } .st-onarilamadi .dot{background:#5A6675;}
.st-hurda       { background:#F2DCD8; color:#9C2A1C; } .st-hurda .dot{background:#C0392B;}
.st-teslim      { background:#CFEAD8; color:#1B5E3C; border-color:#a9d6ba;} .st-teslim .dot{background:#1F7A4D;}

/* Garanti rozeti */
.warranty { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; }
.warranty.ok  { color: var(--green); }
.warranty.no  { color: var(--red); }

/* ============================================================ Alt metrik şeridi */
.metricbar {
  height: var(--h-foot); flex: none; background: var(--rail); color: var(--rail-ink);
  display: flex; align-items: center; gap: 0; padding: 0 6px; font-size: 12px;
  border-top: 1px solid #000;
}
.metric { display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 100%; border-right: 1px solid var(--rail-line); }
.metric .k { color: var(--rail-ink-2); font-size: 11px; }
.metric .v { font-family: 'IBM Plex Mono'; font-weight: 600; color: #fff; }
.metric .v.amber { color: var(--amber); }
.metric .v.red { color: #ef8a7d; }
.metricbar .right { margin-left: auto; display: flex; align-items: center; gap: 0; }
.metric.fx .v { color: #8fd0a6; }

/* ============================================================ Kartlar / Paneller (form) */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-h { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.panel-h .ic { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--petrol); flex:none; }
.panel-h .ic svg { width: 15px; height: 15px; }
.panel-h h3 { margin: 0; font-family: 'Archivo'; font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.panel-h .right { margin-left: auto; display:flex; align-items:center; gap:6px; }
.panel-b { padding: 14px; }

.field { margin-bottom: 11px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.field .hint { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
input.in, select.in, textarea.in {
  width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  padding: 7px 10px; font: inherit; color: var(--ink); transition: border .15s, box-shadow .15s, background .15s;
}
textarea.in { resize: vertical; line-height: 1.5; }
input.in:focus, select.in:focus, textarea.in:focus { outline: none; border-color: var(--amber); background:#fff; box-shadow: 0 0 0 3px var(--amber-soft); }
input.in[readonly] { background: var(--surface-2); color: var(--ink-2); cursor: default; }
select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23767C86' stroke-width='1.8'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.in-with-btn { display: flex; gap: 6px; }
.in-with-btn .in { flex: 1; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* Segmented (Casper / Özel) */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.segmented button { border: none; background: transparent; padding: 6px 14px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--ink-3); cursor: pointer; display:flex; align-items:center; gap:7px; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.segmented button.on.casper { color: var(--petrol); }
.segmented button.on.ozel { color: var(--amber); }

/* etiket/chip giriş (aksesuar) */
.chips-in { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); min-height: 40px; align-content: flex-start; }
.tagchip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 12px; font-weight: 500; }
.tagchip .x { color: var(--ink-3); cursor: pointer; font-weight: 700; }
.tagchip.added { border-color: var(--amber); background: var(--amber-soft); }

/* mini tablo (malzeme / teslim alınanlar) */
.minitable { width: 100%; border-collapse: collapse; font-size: 12px; }
.minitable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 600; }
.minitable td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
.minitable tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: none; }
.minitable .money { text-align: right; }

/* barkod görseli */
.barcode-vis { font-family: 'IBM Plex Mono'; letter-spacing: -1px; font-size: 30px; line-height: 1; color: var(--ink); user-select:none; }
.barcode-no { font-family: 'IBM Plex Mono'; font-weight: 600; color: var(--red); font-size: 14px; }

/* aksiyon barı (teknisyen) */
.actionbar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); flex-wrap: wrap; }
.actionbar .sp { flex: 1; }

/* timeline (hareketler) */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content:''; position:absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item::before { content:''; position:absolute; left:-19px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background:#fff; border: 2px solid var(--amber); }
.tl-item .when { font-size: 11px; color: var(--ink-3); font-family:'IBM Plex Mono'; }
.tl-item .what { font-weight: 600; margin: 1px 0; }
.tl-item .who2 { font-size: 11.5px; color: var(--ink-3); }

/* bildirim baloncuğu */
.notif { position: relative; }
.notif .dot-n { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }

/* küçük yardımcılar */
.muted { color: var(--ink-3); }
.divider { height: 1px; background: var(--line-2); margin: 12px 0; }
.kbd { font-family:'IBM Plex Mono'; font-size: 11px; background: var(--surface-2); border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; padding: 1px 5px; color: var(--ink-2); }
.label-strong { font-family:'Archivo'; font-weight:700; font-size:12px; letter-spacing:.3px; text-transform:uppercase; color: var(--ink-3); }
.stat-pill { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; padding:2px 8px; border-radius:6px; background:var(--surface-2); border:1px solid var(--line); }

/* ============================================================ YENİ KABUK: Navbar + Sağ Drawer */
.page { display: flex; flex-direction: column; height: 100vh; }

.navbar {
  height: var(--h-top); flex: none; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 16px; position: sticky; top: 0; z-index: 30;
}
.navbar .nb-brand { display: flex; align-items: center; gap: 11px; }
.navbar .nb-title { font-family: 'Archivo'; font-weight: 700; font-size: 15.5px; letter-spacing: .2px; }
.navbar .nb-title .crumb { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.navbar .nb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.iconbtn {
  position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: background .14s, border .14s;
}
.iconbtn:hover { background: var(--surface-2); border-color: #d3ccba; }
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn .dot-n { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

.user-btn { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: background .14s, border .14s; }
.user-btn:hover { background: var(--surface-2); border-color: #d3ccba; }
.user-btn .avatar { width: 28px; height: 28px; border-radius: 7px; }
.user-btn .un { line-height: 1.05; text-align: left; }
.user-btn .un b { font-size: 12.5px; font-weight: 600; }
.user-btn .un span { font-size: 10.5px; color: var(--ink-3); }
.user-btn .cv { color: var(--ink-3); }

/* açılır menü */
.pop-wrap { position: relative; }
.menu-pop {
  position: absolute; top: 46px; right: 0; width: 234px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 45;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: .14s;
}
.menu-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-pop .mp-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; display: flex; gap: 10px; align-items: center; }
.menu-pop a { display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 13px; }
.menu-pop a:hover { background: var(--surface-2); }
.menu-pop a svg { width: 17px; height: 17px; color: var(--ink-3); }
.menu-pop a .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 20px; }
.menu-pop .sepm { height: 1px; background: var(--line-2); margin: 5px 4px; }
.menu-pop a.danger { color: var(--red); } .menu-pop a.danger svg { color: var(--red); }

/* sağ drawer (menü) */
.overlay { position: fixed; inset: 0; background: rgba(12,14,18,.42); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; backdrop-filter: blur(1px); }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 268px; background: var(--rail); color: var(--rail-ink);
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); z-index: 60;
  display: flex; flex-direction: column; box-shadow: -20px 0 60px -20px rgba(0,0,0,.5);
}
.drawer.open { transform: translateX(0); }
.drawer .drawer-x { margin-left: auto; background: var(--rail-2); border: 1px solid var(--rail-line); color: var(--rail-ink); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.drawer .drawer-x:hover { color: #fff; }

/* mesaj drawer (dahili sohbet) */
.msg-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 380px; max-width: 92vw; background: var(--surface);
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4,0,.2,1); z-index: 60;
  display: flex; flex-direction: column; box-shadow: -20px 0 60px -20px rgba(0,0,0,.4); border-left: 1px solid var(--line);
}
.msg-drawer.open { transform: translateX(0); }
.msg-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.msg-head h3 { margin: 0; font-family: 'Archivo'; font-weight: 700; font-size: 15px; }
.msg-head .x { margin-left: auto; cursor: pointer; color: var(--ink-3); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.msg-head .x:hover { background: var(--surface-2); }
.msg-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.msg { max-width: 86%; }
.msg .meta { font-size: 11px; color: var(--ink-3); margin-bottom: 3px; display: flex; gap: 7px; align-items: center; }
.msg .meta .who { font-weight: 600; color: var(--ink-2); }
.msg .bubble { background: #fff; border: 1px solid var(--line); padding: 8px 11px; border-radius: 4px 12px 12px 12px; font-size: 12.5px; line-height: 1.45; }
.msg.me { align-self: flex-end; }
.msg.me .meta { justify-content: flex-end; }
.msg.me .bubble { background: var(--amber-soft); border-color: #f0d39a; border-radius: 12px 4px 12px 12px; }
.msg .ref { display: inline-flex; gap: 5px; align-items: center; font-family: 'IBM Plex Mono'; font-size: 11px; color: var(--petrol); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; margin-bottom: 4px; text-decoration: none; }
.msg-compose { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.msg-compose textarea { flex: 1; min-height: 38px; max-height: 110px; resize: none; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 12.5px; background: var(--surface-2); }
.msg-compose textarea:focus { outline: none; border-color: var(--amber); background: #fff; box-shadow: 0 0 0 3px var(--amber-soft); }
.msg-everyone { font-size: 11px; color: var(--ink-3); padding: 7px 16px 0; }

/* üst araç çubuğu (teknisyen aksiyonları) */
.toolbar {
  flex: none; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 9px 16px; display: flex; gap: 7px; align-items: center; position: sticky; top: var(--h-top); z-index: 19;
  overflow-x: auto;
}
.toolbar .sp { flex: 1; }
.toolbar .vline { width: 1px; height: 22px; background: var(--line); margin: 0 3px; flex: none; }

/* görünüm seçici + tarih filtresi (ana ekran) */
.viewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.viewbar .seg-select { display: inline-flex; align-items: center; gap: 8px; }
.viewbar label.lbl { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; }
.viewbar select.vsel, .viewbar input.din { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; font-weight: 600; padding: 0 12px; color: var(--ink); }
.viewbar select.vsel { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23767C86' stroke-width='1.8'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.viewbar input.din { font-weight: 500; }
.viewbar select.vsel:focus, .viewbar input.din:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.daterange { display: none; align-items: center; gap: 7px; padding-left: 2px; }
.daterange.show { display: flex; }
.daterange .arrow { color: var(--ink-3); }
.daterange .din { height: 30px; border-radius: 7px; font-size: 12px; padding: 0 9px; }

/* Görünüm anahtarı — araç çubuğuyla uyumlu pill (etiket + select) */
.search-inline { position: relative; display: inline-flex; align-items: center; }
.search-inline svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
.search-inline input { height: 32px; width: 230px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--ink); transition: border .14s, box-shadow .14s; }
.search-inline input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.view-switch { display: inline-flex; align-items: center; gap: 9px; height: 30px; padding: 0 4px 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border .14s, box-shadow .14s; }
.view-switch:hover { border-color: #d3ccba; }
.view-switch:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.view-switch .vlbl { font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .6px; }
.view-switch .vlbl svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--ink-3); }
.view-switch select { border: none; outline: none; background: transparent; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--ink); height: 28px; padding: 0 22px 0 0; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' stroke='%2316181C' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 3px center; }

/* boş durum (teslim henüz yüklenmedi) */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 20px; text-align: center; color: var(--ink-3); }
.empty-state svg { width: 46px; height: 46px; opacity: .5; }
.empty-state h4 { margin: 0; font-family: 'Archivo'; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.empty-state p { margin: 0; font-size: 12.5px; max-width: 360px; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #cfc8b6; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9b09a; }
.tablescroll::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { border-color: var(--surface); }

/* başlık satırı */
.head-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.head-row h1 { font-family: 'Archivo'; font-weight: 800; font-size: 20px; letter-spacing: .2px; margin: 0; }
.head-row .sub { color: var(--ink-3); font-size: 12.5px; }
.head-row .sp { flex: 1; }
.d-none { display: none !important; }

/* ============================================================ Modal (Logo cari seç) */
.modal-overlay { position: fixed; inset: 0; background: rgba(12,14,18,.5); display: none; align-items: flex-start; justify-content: center; z-index: 80; backdrop-filter: blur(2px); padding-top: 7vh; }
.modal-overlay.show { display: flex; }
.modal { width: min(780px, 94vw); max-height: 80vh; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.modal.md { width: min(940px, 95vw); max-width: none; max-height: 86vh; }
.modal.lg { width: min(1180px, 96vw); max-width: none; height: 86vh; max-height: 92vh; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-h .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--petrol); }
.modal-h .ic svg { width: 16px; height: 16px; }
.modal-h h3 { margin: 0; font-family: 'Archivo'; font-weight: 700; font-size: 15px; }
.modal-h .x { margin-left: auto; cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); }
.modal-h .x:hover { background: var(--surface-2); }
.modal-search { padding: 12px 16px; border-bottom: 1px solid var(--line-2); position: relative; }
.modal-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 0 12px 0 38px; font: inherit; }
.modal-search input:focus { outline: none; border-color: var(--amber); background: #fff; box-shadow: 0 0 0 3px var(--amber-soft); }
.modal-search svg { position: absolute; left: 28px; top: 21px; width: 18px; height: 18px; color: var(--ink-3); }
.modal-body { overflow: auto; flex: 1; }
.modal-body table.grid { min-width: 0; }   /* modal grid'i pencereye sığsın (ana grid 1730px min-width kullanır) */
.modal-body table.grid tbody tr.perakende-row td { color: var(--ink-3); font-style: italic; }

/* ---- Tabulator (Logo modal + Hareket grid) — uygulama temasına uydurma ---- */
#logo-grid { height: 100%; }
#logo-grid .tabulator, #hareket-grid .tabulator { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: inherit; font-size: 12.5px; }
#logo-grid .tabulator .tabulator-header, #hareket-grid .tabulator .tabulator-header { background: var(--surface-2); border-bottom: 1px solid var(--line); }
#logo-grid .tabulator .tabulator-col, #hareket-grid .tabulator .tabulator-col { background: var(--surface-2); border-right: 1px solid var(--line-2); }
#logo-grid .tabulator .tabulator-col-title, #hareket-grid .tabulator .tabulator-col-title { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
#logo-grid .tabulator .tabulator-header-filter input, #hareket-grid .tabulator .tabulator-header-filter input { width: 100%; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 7px; font: inherit; font-size: 11.5px; }
#logo-grid .tabulator .tabulator-header-filter input:focus, #hareket-grid .tabulator .tabulator-header-filter input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
#logo-grid .tabulator-row, #hareket-grid .tabulator-row { border-bottom: 1px solid var(--line-2); }
#logo-grid .tabulator-row.tabulator-row-even, #hareket-grid .tabulator-row.tabulator-row-even { background: transparent; }
#logo-grid .tabulator-row:hover, #hareket-grid .tabulator-row:hover { background: var(--amber-soft); }
#logo-grid .tabulator-cell, #hareket-grid .tabulator-cell { border-right: none; padding: 7px 12px; }
#logo-grid .tabulator-cell .btn-sm { padding: 3px 9px; }

/* Genel Tabulator grid teması (.tgrid) — stok/cari ekranları */
.tgrid .tabulator { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: inherit; font-size: 12.5px; }
.tgrid .tabulator .tabulator-header { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tgrid .tabulator .tabulator-col { background: var(--surface-2); border-right: 1px solid var(--line-2); }
.tgrid .tabulator .tabulator-col-title { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.tgrid .tabulator .tabulator-header-filter input { width: 100%; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 7px; font: inherit; font-size: 11.5px; }
.tgrid .tabulator .tabulator-header-filter input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber-soft); }
.tgrid .tabulator-row { border-bottom: 1px solid var(--line-2); }
.tgrid .tabulator-row.tabulator-row-even { background: transparent; }
.tgrid .tabulator-row:hover { background: var(--amber-soft); }
.tgrid .tabulator-cell { border-right: none; padding: 7px 12px; }
.tgrid .tabulator-cell .btn-sm { padding: 3px 9px; }

/* Reçete grid (Casper ürün reçetesi) */
#recete-grid { height: 100%; }
#recete-grid .tabulator { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-family: inherit; font-size: 12.5px; }
#recete-grid .tabulator .tabulator-header { background: var(--surface-2); border-bottom: 1px solid var(--line); }
#recete-grid .tabulator .tabulator-col { background: var(--surface-2); border-right: 1px solid var(--line-2); }
#recete-grid .tabulator .tabulator-col-title { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
#recete-grid .tabulator .tabulator-header-filter input { width: 100%; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 7px; font: inherit; font-size: 11.5px; }
#recete-grid .tabulator-row { border-bottom: 1px solid var(--line-2); }
#recete-grid .tabulator-row.tabulator-row-even { background: transparent; }
#recete-grid .tabulator-row:hover { background: var(--amber-soft); }
#recete-grid .tabulator-cell { border-right: none; padding: 7px 12px; }

/* ============================================================ Satır işlemler menüsü (büyüteç/kebab) */
.cell-menu { width: 34px; padding-left: 10px !important; padding-right: 2px !important; }
.row-menu-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.row-menu-btn:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.row-menu-btn svg { width: 16px; height: 16px; }
.row-menu { position: fixed; min-width: 216px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 90; display: none; }
.row-menu.show { display: block; }
.row-menu a { display: flex; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--ink); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.row-menu a:hover { background: var(--surface-2); }
.row-menu a svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.row-menu a.accent { color: var(--petrol); } .row-menu a.accent svg { color: var(--petrol); }
.row-menu .sepm { height: 1px; background: var(--line-2); margin: 5px 4px; }
.row-menu .mh { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-3); padding: 6px 10px 4px; }

/* ============================================================ Teslimat onay checklist */
.checkline { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); margin-bottom: 8px; cursor: pointer; transition: background .12s, border .12s; }
.checkline:hover { background: #fff; border-color: #d3ccba; }
.checkline:last-child { margin-bottom: 0; }
.checkline input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--petrol); flex: none; cursor: pointer; }
.checkline .ct { font-weight: 600; font-size: 12.5px; }
.checkline .cs { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.checkline.done { background: var(--green-bg); border-color: #a9d6ba; }

.pay-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.pay-row:last-child { border-bottom: none; }
.pay-row .pk { color: var(--ink-3); }
.pay-row .pv { font-family: 'IBM Plex Mono'; font-weight: 600; }
.pay-row.total { font-size: 15px; padding-top: 12px; }
.pay-row.total .pv { color: var(--petrol); }
.pay-row.kalan .pv { color: var(--red); }

/* ============================================================ Personel modülü */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.statc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.statc .sv { font-family: 'Archivo'; font-weight: 800; font-size: 26px; line-height: 1; }
.statc .sl { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.statc .si { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.statc .si svg { width: 18px; height: 18px; }
.si.green { background: var(--green-bg); color: var(--green); }
.si.blue { background: var(--blue-bg); color: var(--blue); }
.si.amber { background: var(--amber-soft); color: #8a5907; }
.si.slate { background: var(--slate-bg); color: var(--slate); }

.av-lg { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; font-family: 'Archivo'; }
.av-c1 { background: linear-gradient(140deg,#0E5B62,#0b3b40); }
.av-c2 { background: linear-gradient(140deg,#C9760A,#a85f08); }
.av-c3 { background: linear-gradient(140deg,#2563B4,#1a4a8c); }
.av-c4 { background: linear-gradient(140deg,#2E7D54,#1e5e3c); }
.av-c5 { background: linear-gradient(140deg,#6C5CC4,#4a3f95); }
.av-c6 { background: linear-gradient(140deg,#384049,#222830); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.staff-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .14s, transform .08s; }
.staff-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.staff-card .sc-top { display: flex; gap: 13px; padding: 15px 15px 12px; align-items: center; position: relative; }
.staff-card .sc-on { position: absolute; left: 50px; top: 50px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #fff; }
.sc-on.on { background: var(--green); } .sc-on.off { background: #c4cbd2; } .sc-on.leave { background: var(--blue); }
.staff-card .sc-name { font-family: 'Archivo'; font-weight: 700; font-size: 15px; }
.staff-card .sc-role { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.role-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .4px; }
.role-admin { background: var(--amber-soft); color: #8a5907; }
.role-tek { background: var(--green-bg); color: var(--green); }
.role-op { background: var(--blue-bg); color: var(--blue); }
.staff-card .sc-meta { padding: 0 15px 12px; display: flex; flex-direction: column; gap: 5px; }
.staff-card .sc-meta .mrow { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.staff-card .sc-meta .mrow svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.staff-card .sc-stats { display: flex; border-top: 1px solid var(--line-2); }
.staff-card .sc-stat { flex: 1; text-align: center; padding: 10px 6px; border-right: 1px solid var(--line-2); }
.staff-card .sc-stat:last-child { border-right: none; }
.staff-card .sc-stat .n { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 16px; }
.staff-card .sc-stat .t { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; margin-top: 1px; }
.staff-card .sc-foot { display: flex; gap: 7px; padding: 11px 15px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

/* devam durum çipleri */
.att-in     { background:#DCF0E3; color:#1E6B43; } .att-in .dot{background:#2E7D54;}
.att-out    { background:#E7EAEE; color:#4E5A69; } .att-out .dot{background:#6B7686;}
.att-leave  { background:#DEEAF8; color:#1D4F8C; } .att-leave .dot{background:#2563B4;}
.att-late   { background:#FCE3D2; color:#9A4A1C; } .att-late .dot{background:#E0701F;}
.att-absent { background:#F2DCD8; color:#9C2A1C; } .att-absent .dot{background:#C0392B;}

/* haftalık devam ızgarası */
.att-week { width: 100%; border-collapse: separate; border-spacing: 5px; }
.att-week th { font-size: 11px; color: var(--ink-3); font-weight: 600; padding: 2px; text-align: center; }
.att-week td.aname { text-align: left; font-weight: 600; font-size: 12.5px; white-space: nowrap; padding-right: 12px; }
.att-cell { height: 32px; border-radius: 7px; text-align: center; font-size: 10px; font-weight: 600; font-family: 'IBM Plex Mono'; line-height: 32px; }
.att-cell.full   { background:#DCF0E3; color:#1E6B43; }
.att-cell.late   { background:#FCE3D2; color:#9A4A1C; }
.att-cell.leave  { background:#DEEAF8; color:#1D4F8C; }
.att-cell.absent { background:var(--surface-2); color:#b7b09e; }

/* izin talebi + kalan izin */
.req { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; }
.req:last-child { margin-bottom: 0; }
.req .rh { display: flex; align-items: center; gap: 9px; }
.req .rt { font-weight: 600; font-size: 12.5px; }
.req .rs { font-size: 11px; color: var(--ink-3); margin: 4px 0 8px; }
.req .ra { display: flex; gap: 6px; }
.leave-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.leave-row:last-child { border-bottom: none; }
.leave-row .ln { font-weight: 600; font-size: 12.5px; width: 130px; flex: none; }
.leave-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.leave-bar span { display: block; height: 100%; background: var(--petrol); border-radius: 6px; }
.leave-row .lk { font-family: 'IBM Plex Mono'; font-size: 11.5px; color: var(--ink-2); width: 70px; text-align: right; flex: none; }

/* ============================================================ Aylık Puantaj (devam giriş) */
.lock-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--amber-soft); color: #8a5907; }
.lock-badge svg { width: 13px; height: 13px; }
.month-nav { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 3px; }
.month-nav b { font-family: 'Archivo'; font-weight: 700; font-size: 13px; padding: 0 10px; min-width: 130px; text-align: center; }
.month-nav button { width: 28px; height: 28px; border: none; background: transparent; border-radius: 7px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.month-nav button:hover { background: var(--surface-2); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; font-size: 11.5px; color: var(--ink-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 15px; height: 15px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.06); }

.month-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); max-height: calc(100vh - 280px); }
table.month { border-collapse: separate; border-spacing: 0; width: max-content; }
.month th, .month td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.month thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--ink-2); padding: 7px 0 5px; text-align: center; min-width: 48px; }
.month thead th .dw { display: block; font-size: 9px; font-weight: 600; color: var(--ink-3); margin-top: 1px; }
.month thead th.weekend { background: #ede8db; color: var(--ink-3); }
.month .pcol { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding: 6px 14px; font-weight: 600; font-size: 12.5px; white-space: nowrap; min-width: 184px; box-shadow: 2px 0 0 var(--line); }
.month thead th.pcol { z-index: 5; background: var(--surface-2); }
.month td { padding: 3px; text-align: center; }
.month td.weekend { background: var(--surface-2); }
.dcell { width: 42px; height: 40px; margin: 0 auto; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: 'IBM Plex Mono'; line-height: 1.05; transition: outline .1s; }
.dcell:hover { outline: 2px solid var(--amber); outline-offset: -2px; }
.dcell .din2 { font-size: 11px; font-weight: 600; }
.dcell .dout { font-size: 8.5px; color: var(--red); margin-top: 1px; }
.dcell.worked { background: #E4F1E9; } .dcell.worked .din2 { color: #1E6B43; }
.dcell.late   { background: #FBEAD9; } .dcell.late .din2 { color: #9A4A1C; }
.dcell.lv-yi  { background: #DEEAF8; color: #1D4F8C; font-weight: 700; font-size: 12px; }
.dcell.lv-ui  { background: #E7EAEE; color: #4E5A69; font-weight: 700; font-size: 12px; }
.dcell.lv-rt  { background: #E7E2F6; color: #564A9A; font-weight: 700; font-size: 12px; }
.dcell.lv-ht  { background: transparent; color: #cfc8b6; }
.dcell.empty  { color: #d8d2c4; }

/* hücre editörü */
.cell-editor { position: fixed; width: 234px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 13px; z-index: 95; display: none; }
.cell-editor.show { display: block; }
.cell-editor .ce-h { margin-bottom: 10px; }
.cell-editor .ce-h b { font-size: 13px; font-family: 'Archivo'; }
.cell-editor .ce-h .ce-who { font-size: 11.5px; color: var(--ink-3); display: block; }
.ce-tabs { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; margin-bottom: 6px; }
.ce-tabs button { flex: 1; border: none; background: transparent; padding: 6px; border-radius: 6px; font: inherit; font-weight: 600; font-size: 12px; color: var(--ink-3); cursor: pointer; }
.ce-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.cell-editor label { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin: 9px 0 4px; text-transform: uppercase; letter-spacing: .3px; }
.cell-editor input, .cell-editor select { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 0 10px; font: inherit; color: var(--ink); }
.cell-editor select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='none' stroke='%23767C86' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; }
.cell-editor input:focus, .cell-editor select:focus { outline: none; border-color: var(--amber); background: #fff; box-shadow: 0 0 0 3px var(--amber-soft); }
.cell-editor .ce-foot { display: flex; gap: 7px; margin-top: 13px; }
.cell-editor .ce-foot .btn { flex: 1; justify-content: center; }

/* ============================================================ Personel bilgi formu — aylık takvim */
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal th { font-size: 11px; color: var(--ink-3); font-weight: 600; padding: 2px; text-align: center; }
.calcell { height: 60px; border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 8px; vertical-align: top; background: #fff; }
.calcell .cd { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.calcell .cv { font-family: 'IBM Plex Mono'; font-weight: 600; font-size: 13px; margin-top: 7px; }
.calcell .cout { font-family: 'IBM Plex Mono'; font-size: 9.5px; color: var(--red); margin-top: 1px; }
.calcell.worked { background: #E4F1E9; border-color: #cfe6d8; } .calcell.worked .cv { color: #1E6B43; }
.calcell.late   { background: #FBEAD9; border-color: #f0dcc5; } .calcell.late .cv { color: #9A4A1C; }
.calcell.lv-yi  { background: #DEEAF8; border-color: #caddf0; } .calcell.lv-yi .cv { color: #1D4F8C; }
.calcell.lv-ui  { background: #E7EAEE; border-color: #d6dbe1; } .calcell.lv-ui .cv { color: #4E5A69; }
.calcell.lv-rt  { background: #E7E2F6; border-color: #d6cef0; } .calcell.lv-rt .cv { color: #564A9A; }
.calcell.weekend { background: var(--surface-2); border-style: dashed; }
.calcell.empty  { background: var(--surface); }
.calcell.empty .cd { color: #cfc8b6; }

/* izin talep geçmişi durum çipi */
.lvst { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.lvst.ok { background: var(--green-bg); color: var(--green); }
.lvst.wait { background: #FBEAD9; color: #9A4A1C; }
.lvst.no { background: var(--red-bg); color: var(--red); }
.lvitem { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.lvitem:last-child { border-bottom: none; }
.lvitem .li-t { font-weight: 600; font-size: 12.5px; }
.lvitem .li-s { font-size: 11px; color: var(--ink-3); }

/* yapılan iş satırı */
.jobrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.jobrow:last-child { border-bottom: none; }
.jobrow .jb { font-family: 'IBM Plex Mono'; font-size: 11px; color: var(--petrol); }
.jobrow .jt { font-weight: 600; font-size: 12.5px; flex: 1; }

/* ============================================================ Müşteriler / Stok tip rozetleri */
.tip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tip-perakende { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tip-kurumsal  { background: var(--blue-bg); color: var(--blue); }
.tip-tm { background:#DCF0E3; color:#1E6B43; } .tip-hm { background:#DEEAF8; color:#1D4F8C; }
.tip-ym { background:#F6E7C9; color:#7A5410; } .tip-tk { background:#E7E2F6; color:#564A9A; }
.stock-low { color: var(--red); font-weight: 700; }
.stock-ok  { color: var(--green); font-weight: 600; }

/* ============================================================ Mesaj Şablonları (master-detail) */
.tpl-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.tpl-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.tpl-list .tlh { padding: 11px 14px; border-bottom: 1px solid var(--line); font-family: 'Archivo'; font-weight: 700; font-size: 12.5px; display: flex; align-items: center; }
.tpl-li { padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; display: flex; gap: 11px; align-items: flex-start; transition: background .12s; }
.tpl-li:last-child { border-bottom: none; }
.tpl-li:hover { background: var(--surface-2); }
.tpl-li.active { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); }
.tpl-li .tch { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.tpl-li .tch svg { width: 16px; height: 16px; }
.tch.sms { background: #DEEAF8; color: #1D4F8C; } .tch.wa { background: #DCF0E3; color: #1b7a44; } .tch.mail { background: #E7E2F6; color: #564A9A; }
.tpl-li .tn { font-weight: 600; font-size: 12.5px; }
.tpl-li .td2 { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.tpl-li .tactive { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; flex: none; }
.tpl-li .tactive.off { background: #c4cbd2; }

.var-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { font-family: 'IBM Plex Mono'; font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; transition: .12s; }
.var-chip:hover { border-color: var(--amber); background: var(--amber-soft); }
.preview-phone { background: linear-gradient(180deg,#e9e4d8,var(--bg)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.sms-preview { max-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 11px 13px; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); }
.sms-preview .hl { color: var(--petrol); font-weight: 600; }
.sms-meta { font-size: 11px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.toggle { position: relative; width: 40px; height: 22px; border-radius: 20px; background: #cfc8b6; cursor: pointer; transition: background .15s; flex: none; }
.toggle.on { background: var(--green); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on::after { left: 20px; }

/* Dahili mesajlasma ek arayuz (alici secimi + resim) */
.msg-tools { display:flex; align-items:center; gap:6px; padding:8px 12px 0; }
.msg-hedef { flex:1; height:32px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); font:inherit; font-size:12px; padding:0 9px; color:var(--ink); }
.msg-attach { width:34px; height:32px; flex:none; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink-2); cursor:pointer; }
.msg-attach:hover { background:var(--surface-2); }
.msg-attach svg { width:17px; height:17px; }
.msg-prev { display:flex; align-items:center; gap:8px; padding:8px 12px 0; }
.msg-prev img { max-height:64px; border-radius:8px; border:1px solid var(--line); }
.msg-prev .x { border:none; background:var(--red-bg); color:var(--red); width:24px; height:24px; border-radius:7px; cursor:pointer; font-size:15px; line-height:1; }
.msg-img { max-width:190px; max-height:170px; border-radius:10px; margin-top:5px; display:block; border:1px solid var(--line-2); }
.msg-dm { font-size:10px; color:var(--blue); background:var(--blue-bg); padding:0 6px; border-radius:10px; margin:0 4px; }
/* Dahili mesajlasma: kisiler listesi + konusma basligi */
.msg-contacts { flex: 1; overflow-y: auto; background: var(--surface); }
.msg-contact { display: flex; align-items: center; gap: 11px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.msg-contact:hover { background: var(--surface-2); }
.msg-contact .avatar { width: 38px; height: 38px; border-radius: 10px; font-size: 13px; flex: none; }
.msg-contact img.avatar { object-fit: cover; }
.msg-c-body { min-width: 0; }
.msg-c-ad { font-weight: 600; font-size: 13px; color: var(--ink); }
.msg-c-sub { font-size: 11px; color: var(--ink-3); }
.msg-av-all { background: linear-gradient(140deg, var(--petrol), #0b3b40); color: #fff; }
.msg-convhead { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex: none; }
.msg-convhead .avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; flex: none; }
.msg-conv-ad { font-weight: 700; font-size: 13px; color: var(--ink); }
.msg-back { border: none; background: none; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; flex: none; }
.msg-back:hover { background: var(--line); }
.msg-back svg { width: 18px; height: 18px; }
/* Dahili mesajlasma: okunmamis balonu + okundu (cift tik) */
.msg-c-body { flex: 1; min-width: 0; }
.msg-badge { margin-left: 8px; flex: none; min-width: 18px; height: 18px; padding: 0 5px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-family: 'IBM Plex Mono'; }
.tick { font-size: 11px; margin-left: 6px; letter-spacing: -2px; font-weight: 700; }
.tick-sent { color: var(--ink-3); }
.tick-read { color: #2563B4; }
/* Navbar mesaj ikonu: okunmamis sayisi balonu */
.iconbtn .dot-n.dot-count {
  width: auto; height: 16px; min-width: 16px; top: 2px; right: 2px;
  padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; font-family: 'IBM Plex Mono';
  display: grid; place-items: center; line-height: 1;
}