:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1d2433;
  --ink-2: #4b5466;
  --muted: #7a8394;
  --line: #e3e6ec;
  --line-2: #eef0f4;
  --brand: #4a5068;
  --brand-2: #5a6180;
  --brand-soft: #eceef4;
  --accent: #d6667e;
  --accent-2: #c2526b;
  --accent-soft: #fbeef1;
  --pos: #16794c;
  --pos-soft: #e5f4ec;
  --neg: #b42318;
  --neg-soft: #fdecea;
  --warn: #a15c07;
  --warn-soft: #fff4e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.45;
}
a { color: var(--brand-2); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.boot { padding: 60px; text-align: center; color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.strike { text-decoration: line-through; color: var(--muted); }

/* ---------- Yerleşim ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  background: #3c4157; color: #d5d8e2; padding: 12px 10px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #5a6180 transparent;
}
.brand { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 10px; padding: 8px; margin-bottom: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img.full { width: 100%; max-width: 180px; height: auto; display: block; }
.brand img.mini { display: none; width: 30px; height: 30px; }
.nav-box { background: #4a5068; border-radius: 10px; padding: 5px; margin-bottom: 8px; }
.nav-group { margin: 4px 6px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: #f4c0d1; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 7px; color: #d5d8e2;
  font-size: 13px; text-decoration: none; margin: 1px 0;
}
.nav a:hover { background: #ffffff14; color: #fff; text-decoration: none; }
.nav a.on { background: var(--accent); color: #fff; font-weight: 600; }
.nav .ic, .collapse .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.nav .ic svg { width: 16px; height: 16px; }
.nav a.on .ic { background: #fff !important; color: var(--accent-2) !important; }
.ic.c1 { background: #5a6180; color: #e6e8ef; }
.ic.cb { background: #2f4a6b; color: #b5d4f4; }
.ic.cg { background: #2f5f4a; color: #9fe1cb; }
.ic.cr { background: #6b3a44; color: #f7c1c1; }
.ic.ca { background: #6a5124; color: #fac775; }
.ic.cp { background: #5b3a52; color: #f4c0d1; }
.collapse { margin-top: auto; display: flex; align-items: center; gap: 9px; background: none; border: 0; color: #b9bdcb; font: inherit; font-size: 12px; padding: 6px; border-radius: 7px; cursor: pointer; text-align: left; }
.collapse:hover { background: #ffffff14; color: #fff; }
.collapse .ic svg { width: 18px; height: 18px; }
.layout { transition: grid-template-columns .15s; }
.layout.collapsed { grid-template-columns: 70px 1fr; }
.layout.collapsed .side { padding: 12px 8px; }
.layout.collapsed .brand { padding: 6px; }
.layout.collapsed .brand img.full, .layout.collapsed .nav-group, .layout.collapsed .tx { display: none; }
.layout.collapsed .brand img.mini { display: block; }
.layout.collapsed .nav-box { padding: 4px; }
.layout.collapsed .nav a, .layout.collapsed .collapse { justify-content: center; padding: 5px 0; }
.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px; background: var(--panel);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 650; flex: 1; }
.topbar .who { font-size: 12.5px; color: var(--ink-2); text-align: right; }
.topbar .who b { display: block; color: var(--ink); font-size: 13px; }
.period-pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.period-pick select { padding: 5px 8px; }
.content { padding: 18px 22px 60px; max-width: 1400px; }
.banner {
  margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); background: var(--warn-soft);
  color: var(--warn); border: 1px solid #f3d9a8; font-size: 13px;
}
.banner.info { background: var(--brand-soft); color: var(--brand); border-color: #cfdcef; }
.menu-btn { display: none; align-items: center; gap: 7px; background: #3c4157; color: #fff; border: 0; border-radius: 22px;
  height: 40px; padding: 0 14px 0 6px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; flex: none; }
.menu-btn:active { background: #4a5068; }
.menu-btn .mb-logo { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.menu-btn .mb-logo img { width: 20px; height: 20px; object-fit: contain; }
.scrim { display: none; }

/* ---------- Bileşenler ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h2, .card-h h3 { font-size: 14.5px; margin: 0; font-weight: 650; flex: 1; }
.card-b { padding: 14px 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 21px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kpi.main { background: var(--brand); color: #fff; border-color: var(--brand); }
.kpi.main .l, .kpi.main .s { color: #c9d6ea; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); padding: 7px 12px; border-radius: 7px; font: inherit; font-size: 13px; cursor: pointer;
  white-space: nowrap; font-weight: 500;
}
.btn:hover { border-color: #c8cdd6; background: #fafbfc; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--neg); border-color: #f1c4bf; }
.btn.danger:hover { background: var(--neg-soft); }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.link { border: none; background: none; color: var(--brand-2); padding: 2px 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  font: inherit; font-size: 13.5px; padding: 7px 9px; border: 1px solid #cfd4dc; border-radius: 7px;
  background: #fff; color: var(--ink); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9db8e0; outline-offset: 0; border-color: var(--brand-2); }
textarea { resize: vertical; min-height: 60px; }
.search { width: 240px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
label.f > input, label.f > select, label.f > textarea { width: 100%; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink); }
.check input { margin-top: 2px; }
.seg { display: inline-flex; border: 1px solid #cfd4dc; border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 14px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid #cfd4dc; }
.seg button.on { background: var(--brand); color: #fff; }
.calc { background: var(--brand-soft); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--brand); }
.calc b { font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.pos { background: var(--pos-soft); color: var(--pos); }
.tag.neg { background: var(--neg-soft); color: var(--neg); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- Tablolar ---------- */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 0; white-space: nowrap;
}
table.t td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:hover td { background: #fafcff; }
table.t tr.cancel td { color: var(--muted); }
table.t tr.cancel td .amt { text-decoration: line-through; }
table.t tfoot td { font-weight: 650; border-top: 2px solid var(--line); background: #fafbfc; }
table.t th.num, table.t td.num { text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 14px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 1000px; }
.modal-h { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { margin: 0; flex: 1; font-size: 15.5px; }
.modal-b { padding: 16px 18px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.err { background: var(--neg-soft); color: var(--neg); border-radius: 7px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }

/* ---------- Bildirim ---------- */
/* Anlık uyarılar ekranın ortasında görünür; arkadaki sayfaya dokunmayı engellemez */
#toast-root { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column;
  align-items: center; gap: 8px; z-index: 80; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: rgba(29, 36, 51, .94); color: #fff; padding: 14px 22px; border-radius: 12px; font-size: 15px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 420px; text-align: center; animation: toast-in .18s ease-out; }
.toast.error { background: rgba(180, 35, 24, .95); }
@keyframes toast-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #f6f1f3, #e9ebf2); }
.auth .logo-big { display: block; width: 220px; max-width: 70%; margin: 0 auto 6px; }
.auth .box { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.auth .box.wide { max-width: 620px; }
.auth h1 { margin: 0 0 4px; font-size: 18px; text-align: center; color: var(--brand); }
.auth .box > div > p { text-align: center; }
.auth p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.auth .stack { display: grid; gap: 12px; }

/* ---------- Kesim ---------- */
.steps { display: grid; gap: 6px; font-size: 13px; }
.steps div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.steps div.total { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 8px; }
.payout-input { width: 130px; text-align: right; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }
.print-head { display: none; }

@media screen and (max-width: 900px) and (hover: none) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; left: -270px; width: 250px; z-index: 40; transition: left .2s; }
  .layout.collapsed { grid-template-columns: 1fr; }
  .layout.collapsed .side { padding: 12px 10px; }
  .layout.collapsed .brand img.full, .layout.collapsed .nav-group, .layout.collapsed .tx { display: revert; }
  .layout.collapsed .brand img.mini { display: none; }
  .layout.collapsed .nav a { justify-content: flex-start; padding: 5px 6px; }
  .collapse { display: none; }
  .side.open { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .menu-btn { display: inline-flex; }
  .topbar h1 { font-size: 15px; }
  .scrim.on { display: block; position: fixed; inset: 0; background: rgba(20, 24, 38, .45); z-index: 35; touch-action: none; transition: background .2s; }
  .scrim.on.closing { background: transparent; }
  body.menu-open { overflow: hidden; }
  .side { touch-action: pan-y; overscroll-behavior: contain; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; }
  .content { padding: 14px 12px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .topbar .who { display: none; }
}

@media print {
  body { background: #fff; }
  .side, .topbar, .toolbar, .no-print, .btn, .row-actions, #toast-root, .banner { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: none; }
  .print-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
  .print-head img { height: 46px; }
  .print-head h2 { margin: 0; font-size: 18px; }
  table.t th { background: #fff; position: static; }
  table.t td, table.t th { padding: 4px 6px; }
  .kpi { box-shadow: none; }
  .kpi.main { background: #fff; color: var(--ink); }
}

/* ---------- Personel İşlemleri ---------- */
.month-nav { display: inline-flex; align-items: center; gap: 4px; }
.month-nav b { min-width: 130px; text-align: center; font-size: 14px; }
.pt-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.pt-list { max-height: calc(100vh - 210px); overflow-y: auto; }
.pt-list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.pt-list a:hover { background: #fafbfc; }
.pt-list a.on { background: var(--accent-soft); }
.pt-list a small { display: block; color: var(--muted); font-size: 11.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .wd { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 2px 0; }
.day { position: relative; border: 1px solid var(--line); border-radius: 9px; min-height: 66px; padding: 6px 7px; background: #fff; cursor: pointer; text-align: left; font: inherit; display: flex; flex-direction: column; justify-content: space-between; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.day:hover { box-shadow: 0 0 0 2px #c9cedb inset; }
.day .n { font-weight: 700; font-size: 14px; }
.day .l { font-size: 11px; line-height: 1.15; }
.day .ot { position: absolute; top: 5px; right: 6px; font-size: 10.5px; font-weight: 700; background: #efe7fb; color: #6b3fb8; border-radius: 10px; padding: 0 6px; }
.day.today { box-shadow: 0 0 0 2px var(--accent) inset; }
.day.blank { visibility: hidden; }
.st-Present { background: #eaf6ef; border-color: #bfe3cc; color: #17663f; }
.st-Unpaid { background: #fdecea; border-color: #f4c3bd; color: #a12619; }
.st-Paid { background: #e8f0fb; border-color: #c3d6f2; color: #1f4f96; }
.st-Off { background: #f1f2f5; border-color: #e1e3e9; color: #6a7183; }
.st-Extra { background: #ddf3f3; border-color: #94d2d4; color: #0e6b72; }
.st-Outside { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 6px, #f0f0f2 6px, #f0f0f2 12px); color: #a3a8b5; cursor: not-allowed; }
.k-holiday { background: #fff2dc; border-color: #f2d39b; color: #8a5300; }
.k-weeklyOff { background: #f1f2f5; color: #6a7183; }
.k-work { background: #eaf6ef; border-color: #bfe3cc; color: #17663f; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.sumlist div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.sumlist div.total { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; font-size: 15px; padding-top: 8px; margin-top: 4px; }
.emp-head { display: flex; gap: 16px; align-items: center; }
.sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 50px; }
.sign div { flex: 1; border-top: 1px solid var(--ink); padding-top: 6px; text-align: center; font-size: 12px; }
@media screen and (max-width: 1200px) and (hover: none) { .pt-layout { grid-template-columns: 220px minmax(0, 1fr); } .pt-layout > .pt-side { grid-column: 1 / -1; } }
@media screen and (max-width: 900px) and (hover: none) {
  .pt-layout { grid-template-columns: 1fr; }
  /* Telefonda puantaj: kısa kutular, durum yazısı kutunun ortasında küçük, fazla mesai sağ üst köşede */
  .cal { gap: 4px; }
  #calc { padding: 10px; }
  .day { min-height: 52px; height: 52px; padding: 3px 2px 2px; overflow: hidden; }
  .day .n { font-size: 12px; line-height: 1.1; }
  .day .l { position: absolute; left: 2px; right: 2px; top: 58%; transform: translateY(-50%); font-size: 9px; line-height: 1.05;
    text-align: center; white-space: normal; letter-spacing: -.15px; }
  .day .ot { top: 3px; right: 3px; font-size: 6.6px; padding: 0; line-height: 9px; white-space: nowrap; background: transparent; }
  [dir=rtl] .day .ot { right: auto; left: 3px; }
}
@media print {
  .pt-layout { display: block; }
  .pt-list-card { display: none !important; }
  .day { min-height: 44px; }
  .print-only { display: block !important; }
  .sign.print-only { display: flex !important; }
}
.print-only { display: none; }

table.t.compact td, table.t.compact th { padding: 6px 7px; }
table.t.compact th { font-size: 10.5px; letter-spacing: .2px; white-space: normal; }

/* ---------- Telefon / tablet: uzun basma davranışı ----------
   Dokunmatik ekranlarda telefonun kendi uzun basma eylemleri (metin seçme, "kopyala / paylaş"
   menüsü, bağlantı ve resim önizlemesi) kapalıdır. Sadece kullanıcının değer girdiği kutular
   ve puantaj takvimindeki fazla mesai uzun basması çalışır. */
@media (hover: none) and (pointer: coarse) {
  html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  img, svg, a { -webkit-user-drag: none; -webkit-touch-callout: none; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=date]):not([disabled]),
  textarea:not([disabled]), [contenteditable="true"] {
    -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
  }
}

/* ---------- Telefon yerleşimi ---------- */
.split { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
@media screen and (max-width: 900px) and (hover: none) {
  .split { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
  .topbar h1 { order: 2; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .menu-btn { order: 1; }
  .topbar #logout { order: 3; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .v { font-size: 17px; }
  .kpi.main { grid-column: 1 / -1; }
  .toolbar { gap: 6px; }
  .toolbar .btn { padding: 7px 10px; }
  .month-nav { width: 100%; justify-content: space-between; }
  .card-h { padding: 10px 12px; }
  .card-b { padding: 12px; }
  .modal-bg { padding: 12px 8px; }
  .modal-b { padding: 14px 12px; }
  .payout-input { width: 100%; }
  .steps div { font-size: 13px; }
}
@media screen and (max-width: 700px) and (hover: none) {
  /* Tablolar kart görünümünde: her satır bir kart, her hücre "Sütun adı ..... değer" */
  .tbl-wrap { overflow-x: visible; }
  body:not(.print-measure) table.t, body:not(.print-measure) table.t tbody, body:not(.print-measure) table.t tfoot, body:not(.print-measure) table.t tr, body:not(.print-measure) table.t td { display: block; width: 100%; }
  body:not(.print-measure) table.t thead { display: none; }
  body:not(.print-measure) table.t tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  body:not(.print-measure) table.t tbody tr:nth-child(even) td { background: transparent; }
  body:not(.print-measure) table.t tr:hover td { background: transparent; }
  body:not(.print-measure) table.t td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    text-align: right; white-space: normal; min-height: 0; }
  body:not(.print-measure) table.t td > .cv { max-width: 65%; text-align: right; display: block; }
  body:not(.print-measure) table.t td > .cv:empty { display: none; }
  body:not(.print-measure) table.t td:has(> .cv:empty) { display: none; }
  body:not(.print-measure) table.t td.detail-cell .cv { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  body:not(.print-measure) table.t td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px;
    text-align: left; flex: none; max-width: 42%; font-weight: 500; }
  body:not(.print-measure) table.t td[data-label=""]::before { display: none; }
  body:not(.print-measure) table.t td:empty, body:not(.print-measure) table.t td.blank { display: none; }
  body:not(.print-measure) table.t td:first-child { justify-content: flex-start; text-align: left; font-weight: 600; font-size: 13.5px; padding-top: 0; }
  body:not(.print-measure) table.t td:first-child::before { display: none; }
  body:not(.print-measure) table.t td:first-child > .cv { max-width: none; text-align: left; }
  body:not(.print-measure) table.t td[data-label=""] { justify-content: flex-end; }
  body:not(.print-measure) table.t td .row-actions { justify-content: flex-end; }
  body:not(.print-measure) table.t td[data-label=""] > .cv { max-width: none; }
  body:not(.print-measure) table.t tfoot tr { background: #fafbfc; }
  body:not(.print-measure) table.t tfoot td { border-top: 0; background: transparent; }
  body:not(.print-measure) table.t td.num { text-align: right; }
  body:not(.print-measure) table.t td select, body:not(.print-measure) table.t td input { max-width: 60% !important; }
  body:not(.print-measure) table.t td .small { display: block; }
  .search { width: 100%; }
}

/* iPhone, yazı boyutu 16px'ten küçük bir kutuya dokunulunca sayfayı kendiliğinden büyütür ve
   büyütme giriş ekranından sonra da kalır (sayfa ekrandan taşmış görünür). Telefonda kutuları 16px yaparak bunu önleriz.
   Çift dokunmayla yakınlaştırma da kapalı; iki parmakla yakınlaştırma çalışmaya devam eder. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media screen and (max-width: 900px) and (hover: none) {
  input, select, textarea { font-size: 16px !important; }
  html, body { max-width: 100%; overflow-x: clip; }
}

/* ---------- Üst çubuk (renkli, kenarlardan 5px içeride, yuvarlak köşeli) ve yuvarlak köşeli menü ---------- */
.topbar {
  position: sticky; top: 5px; z-index: 5; margin: 5px; border-radius: 12px; border-bottom: 0;
  background: var(--accent); color: #fbeef1; box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
}
.topbar h1 { color: #fff; }
.topbar .who { color: #fbeef1; }
.topbar .who b { color: #fff; }
.tb-tools { display: flex; align-items: center; gap: 8px; }
.topbar .period-pick { color: #fff; }
.topbar select { background: #fff; color: var(--ink); border-color: #fff; }
.topbar #logout { background: transparent; color: #fff; border-color: #fff; }
.topbar #logout:hover { background: #ffffff22; }
.lang-sel { display: inline-flex; align-items: center; gap: 4px; background: #3c4157; color: #fff; border-radius: 8px; padding: 0 4px 0 8px; height: 32px; flex: none; }
.lang-sel select { background: transparent !important; color: #fff !important; border: 0 !important; padding: 4px 4px; font: inherit; font-size: 13px; cursor: pointer; outline: none; }
.lang-sel select option { color: var(--ink); background: #fff; }
.auth { position: relative; }
.auth-lang { position: absolute; top: 14px; inset-inline-end: 14px; }

.layout { grid-template-columns: 260px 1fr; }
.layout.collapsed { grid-template-columns: 80px 1fr; }
@media screen and (max-width: 900px) and (hover: none) {
  .layout, .layout.collapsed { grid-template-columns: 1fr; }
  .topbar { padding: 8px 10px; }
}
@media print { .topbar { display: none !important; } }

/* ---------- Arapça (sağdan sola) ---------- */
[dir=rtl] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif; }
[dir=rtl] .num, [dir=rtl] table.t th.num, [dir=rtl] table.t td.num, [dir=rtl] .payout-input { text-align: left; }
[dir=rtl] table.t th { text-align: right; letter-spacing: 0; }
[dir=rtl] table.t th.num { text-align: left; }
[dir=rtl] .day { text-align: right; }
[dir=rtl] .day .ot { right: auto; left: 6px; }
[dir=rtl] .seg button + button { border-left: 0; border-right: 1px solid #cfd4dc; }
[dir=rtl] .topbar .who { text-align: left; }
[dir=rtl] .collapse { text-align: right; }
[dir=rtl] .collapse .ic svg, [dir=rtl] .month-nav .btn svg { transform: scaleX(-1); }
[dir=rtl] .nav-group { letter-spacing: 0; text-transform: none; font-size: 11.5px; }
[dir=rtl] .menu-btn { padding: 0 6px 0 14px; }
@media screen and (max-width: 900px) and (hover: none) {
}
@media screen and (max-width: 700px) and (hover: none) {
  [dir=rtl] body:not(.print-measure) table.t td, [dir=rtl] body:not(.print-measure) table.t td.num { text-align: left; }
  [dir=rtl] body:not(.print-measure) table.t td > .cv { text-align: left; }
  [dir=rtl] body:not(.print-measure) table.t td::before { text-align: right; letter-spacing: 0; text-transform: none; }
  [dir=rtl] body:not(.print-measure) table.t td:first-child, [dir=rtl] body:not(.print-measure) table.t td:first-child > .cv { text-align: right; }
}

/* ---------- Menü: lacivert kutu, kaydırma çubuğu kutunun dışında (ekranın kenarında), logo sabit ---------- */
.side {
  background: transparent; color: #d5d8e2; padding: 5px; margin: 0; border-radius: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: block;
  direction: rtl; /* kaydırma çubuğu solda */
  scrollbar-width: thin; scrollbar-color: #a3a8ba transparent;
}
.side::-webkit-scrollbar { width: 7px; }
.side::-webkit-scrollbar-thumb { background: #a3a8ba; border-radius: 4px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side > .side-in {
  direction: ltr; background: #3c4157; border-radius: 12px; min-height: 100%;
  padding: 0 10px 12px; display: flex; flex-direction: column;
}
[dir=rtl] .side { direction: ltr; }
[dir=rtl] .side > .side-in { direction: rtl; }
/* Logo menü kaydırılınca yerinde kalır. Arkasında: üstteki 5px boşluğu sayfa rengiyle, kendisini yuvarlak köşeli lacivertle örter */
.side > .side-in { --sp: 10px; }
.brand-hold { position: sticky; top: 0; z-index: 2; padding: 12px 0 10px; margin-bottom: 0; }
.brand-hold::before, .brand-hold::after { content: ""; position: absolute; z-index: -1; }
.brand-hold::before { left: calc(-1 * var(--sp) - 6px); right: calc(-1 * var(--sp) - 6px); top: -6px; height: 20px; background: var(--bg); }
.brand-hold::after { left: calc(-1 * var(--sp)); right: calc(-1 * var(--sp)); top: 0; bottom: 0; background: #3c4157; border-radius: 12px 12px 0 0; }
.brand-hold .brand { margin-bottom: 0; }
.layout.collapsed .side { padding: 5px; }
.layout.collapsed .side > .side-in { padding: 0 7px 12px; --sp: 7px; }
.layout.collapsed .brand-hold { padding-top: 10px; }
@media screen and (max-width: 900px) and (hover: none) {
  /* Telefonda kaydırma çubuğu yok; menü kutusunun içi parmakla kaydırılır */
  .side { position: fixed; top: 0; left: -280px; width: 265px; height: 100vh; height: 100dvh; z-index: 40; transition: left .2s; overflow: hidden; }
  .side > .side-in { height: 100%; min-height: 0; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; }
  .side > .side-in::-webkit-scrollbar { display: none; }
  .brand-hold { top: 0; }
  .side.open { left: 0; box-shadow: none; }
  .side.open > .side-in { box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .layout.collapsed .side { padding: 5px; }
  .layout.collapsed .side > .side-in { padding: 0 10px 12px; --sp: 10px; }
  [dir=rtl] .side { left: auto; right: -280px; transition: right .2s; }
  [dir=rtl] .side.open { right: 0; left: auto; }
  .brand-hold::before { display: none; }
}

/* ---------- Dil seçimi: telefonda başlığın yanında küçük düğme ---------- */
.lang-code { display: none; }
@media screen and (max-width: 900px) and (hover: none) {
  .topbar { flex-wrap: nowrap; }
  .topbar .tb-lang { order: 3; position: relative; height: 38px; padding: 0 9px; gap: 5px; }
  .topbar #logout { order: 4; }
  .topbar .tb-lang .lang-code { display: inline; font-size: 13px; font-weight: 600; }
  .topbar .tb-lang select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px !important; }
  .auth-lang .lang-sel { height: 38px; }
  .auth-lang .lang-sel select { font-size: 16px !important; }
}
table.t tr.row-sel td { background: var(--accent-soft) !important; }
.tag.sel { background: var(--accent); color: #fff; }
.ph-row { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.ph-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Puantaj yazdırma: tek sayfaya sığdır ---------- */
@page { size: A4 portrait; margin: 10mm; }
@media print { body.pt-print #page { zoom: var(--pscale, 1); } }
/* Ölçüm için yazdırma görünümünün ekranda bir anlık kopyası */
body.print-measure .side, body.print-measure .topbar, body.print-measure .toolbar, body.print-measure .no-print,
body.print-measure .btn, body.print-measure .row-actions, body.print-measure .banner, body.print-measure .pt-list-card { display: none !important; }
body.print-measure .layout { display: block; }
body.print-measure .content { padding: 0; max-width: none; }
body.print-measure #page { width: 718px; }
body.print-measure .pt-layout { display: block; }
body.print-measure .card { box-shadow: none; border: none; }
body.print-measure .print-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; padding-bottom: 8px; }
body.print-measure .print-head img { height: 46px; }
body.print-measure .print-only { display: block !important; }
body.print-measure .sign.print-only { display: flex !important; }
body.print-measure .day { min-height: 44px; padding: 4px; }

/* Çok sütunlu tablolar: bilgisayarda hücreler tek satır (açıklama hariç) */
@media (min-width: 701px), (hover: hover) {
  table.t.cells-nowrap td { white-space: nowrap; }
  table.t.cells-nowrap td.wrap { white-space: normal; min-width: 140px; }
}

/* Yazdırırken tablolar kesilmesin (gerekirse printFit küçültür) */
@media print { .tbl-wrap { overflow: visible !important; } .card-b { padding: 0; } .tabs { display: none !important; } }
body.print-measure .tbl-wrap { overflow: visible !important; }
body.print-measure .kpis.no-print, body.print-measure .tabs { display: none !important; }
body.print-measure .card-b { padding: 0; }

/* Geniş tablolar (müşteri ekstresi) yatay A4'e basılır */
@page wide { size: A4 landscape; margin: 10mm; }
@media print { body.print-wide { page: wide; } }
body.print-measure.print-wide #page { width: 1047px; }
/* Ortaklar: kutulardaki düğmeler aynı hizada (kutunun altında) */
.kpi.pkpi { display: flex; flex-direction: column; }
.kpi.pkpi .pk-btns { margin-top: auto; padding-top: 8px; display: flex; gap: 6px; }
.radios { display: flex; gap: 18px; flex-wrap: wrap; padding: 6px 0 2px; }
.radios .check { margin: 0; }

/* Bilgisayarda pencere küçültülünce yerleşim değişmez; sayfa yatay kaydırılır (altta kaydırma çubuğu).
   Telefon/tablet yerleşimi sadece dokunmatik ekranlarda devreye girer. */
@media (hover: hover) { body { min-width: 1280px; } }
@media print { body { min-width: 0 !important; } }
body.print-measure { min-width: 0 !important; }

/* Müşteri ekstresi: çok sütunlu, sıkı yerleşim */
@media (min-width: 701px), (hover: hover) {
  table.t.ekstre th, table.t.ekstre td { padding: 6px 6px; font-size: 12.5px; }
  table.t.ekstre th { font-size: 10px; }
  table.t.ekstre td.wrap { min-width: 110px; }
}
.banner a { text-decoration: underline; cursor: pointer; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; font-size: 12.5px; }
.chip-x { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
/* Form satırlarında kutular aynı hizada (etiket iki satır olsa da) */
.form > label.f { justify-content: flex-end; }

/* Başlık çubuğu: üstündeki ve yanlarındaki 5px boşluk sayfa rengiyle örtülü; kaydırılan içerik orada görünmez */
.topwrap { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 5px 5px 0; }
.topwrap .topbar { position: relative; top: auto; margin: 0; }
@media print { .topwrap { display: none !important; } }
body.print-measure .topwrap { display: none !important; }

/* Ortak fotoğrafları */
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.md { width: 36px; height: 36px; font-size: 13px; }
.pname { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.kpi .pk-head { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; }
.kpi .pk-head b { color: var(--ink); }
/* Telefonda tarih kutuları kutunun dışına taşmasın (iOS'ta tarih kutusunun kendi en küçük genişliği var) */
@media (hover: none) {
  input[type=date], input[type=time], input[type=month] {
    -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%;
    box-sizing: border-box; min-height: 40px; text-align: left; background: #fff;
  }
  input[type=date]::-webkit-date-and-time-value { text-align: left; }
  [dir=rtl] input[type=date]::-webkit-date-and-time-value { text-align: right; }
}

/* Yazdırma: telefonda da bilgisayardaki tablo düzeni kullanılır (yukarıdaki telefon kuralları sadece ekranda geçerli).
   Çok sütunlu tablolar dikey A4'e sığsın diye hücreler alt satıra kayabilir, yazı küçülür. */
@media print {
  table.t.cells-nowrap td, table.t.cells-nowrap th { white-space: normal !important; }
  table.t.ekstre th, table.t.ekstre td { font-size: 8pt !important; padding: 3px 4px !important; }
  table.t.ekstre th { font-size: 6.5pt !important; }
  table.t.ekstre .tag { padding: 0 4px; font-size: 7pt; }
  table.t.ekstre td.wrap { min-width: 0 !important; }
}
body.print-measure table.t.cells-nowrap td, body.print-measure table.t.cells-nowrap th { white-space: normal !important; }
body.print-measure table.t.ekstre th, body.print-measure table.t.ekstre td { font-size: 8pt !important; padding: 3px 4px !important; }
body.print-measure table.t.ekstre td.wrap { min-width: 0 !important; }

@media print { table.t td.num { white-space: nowrap !important; } }
body.print-measure table.t td.num { white-space: nowrap !important; }

/* İşlem geçmişi */
.btn.hist { padding: 2px 4px; color: var(--muted); }
.btn.hist svg { width: 16px; height: 16px; display: block; }
.btn.hist:hover { color: var(--accent-2); }
ul.hist { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
ul.hist li { padding: 6px 0 10px 14px; position: relative; }
ul.hist li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.hist-h { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
table.hist-diff { margin-top: 4px; font-size: 12.5px; border-collapse: collapse; }
table.hist-diff td { padding: 2px 8px 2px 0; }
table.hist-diff td.old { color: var(--muted); text-decoration: line-through; }
[dir=rtl] ul.hist { border-left: 0; border-right: 2px solid var(--line); }
[dir=rtl] ul.hist li { padding: 6px 14px 10px 0; }
[dir=rtl] ul.hist li::before { left: auto; right: -6px; }

/* Vurgulu (renksiz) özet kutusu: yazı bir tık büyük */
.kpi.big .v { font-size: 25px; }
.kpi.big .l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi .v.blue { color: #1f5fa8; }
/* Açık renkli düğmeler */
.btn.c-green { background: #e3f4ea; border-color: #b9e0c8; color: #16794c; }
.btn.c-green:hover { background: #d3eddd; }
.btn.c-blue { background: #e6effa; border-color: #bcd3ef; color: #1f5fa8; }
.btn.c-blue:hover { background: #d7e5f6; }
.btn.c-red { background: #fdecea; border-color: #f4c4bf; color: #b42318; }
.btn.c-red:hover { background: #fadcd8; }
.btn .bi { display: inline-flex; margin-right: 6px; }
.btn .bi svg { width: 16px; height: 16px; }
[dir=rtl] .btn .bi { margin-right: 0; margin-left: 6px; }
/* Menüde yatay kaydırma çubuğu olmasın */
.side, .side > .side-in { overflow-x: hidden; }

select.act.missing { border-color: var(--neg); box-shadow: 0 0 0 2px var(--neg-soft); }

/* Tedarikçiler: açılır/kapanır tedarikçi kutuları */
.sup-h { cursor: pointer; gap: 12px; user-select: none; }
.sup-h h3 { flex: 1; }
.sup-h:hover { background: #fafbfc; }
.sup-ar { font-size: 14px; width: 14px; color: var(--muted); }
@media screen and (max-width: 700px) and (hover: none) { .sup-h { flex-wrap: wrap; } .sup-h h3 { flex-basis: calc(100% - 30px); } }
.sup-del { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 10px; }

/* Telefonda aşağı çekerek yenileme */
@media (hover: none) { html, body { overscroll-behavior-y: contain; } }
.ptr { position: fixed; left: 50%; top: 0; transform: translate(-50%, -60px); z-index: 60; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .2); display: grid; place-items: center; color: var(--accent-2); transition: transform .15s; pointer-events: none; }
.ptr svg { width: 22px; height: 22px; }
.ptr.go svg { animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }
/* Telefonda dil seçimi: arka plan ve çerçeve yok */
@media screen and (max-width: 900px) and (hover: none) {
  .topbar .tb-lang { background: transparent; padding: 0 4px; }
}

/* Sadece bilgisayarda / sadece telefonda görünen yazılar */
.only-tel { display: none; }
@media screen and (max-width: 900px) and (hover: none) { .only-pc { display: none !important; } .only-tel { display: inline; } }

/* Üretim Yönetimi */
.ic.ct { background: #1f5c63; color: #a8e3e6; }
.btn.c-amber { background: #fff4df; border-color: #f0cf8f; color: #8a5a00; }
.btn.c-amber:hover { background: #fdeac6; }
.row-actions.oa { align-items: center; gap: 4px; flex-wrap: nowrap; }
.row-actions.oa .btn.sm:not(.link) { white-space: nowrap; }
@media screen and (max-width: 900px) and (hover: none) {
  body:not(.print-measure) .row-actions.oa { width: 100%; justify-content: space-between; gap: 3px; }
  body:not(.print-measure) .row-actions.oa .btn.sm { padding: 5px 6px; font-size: 12.5px; white-space: nowrap; }
  body:not(.print-measure) .row-actions.oa .btn.link.sm { padding: 5px 2px; }
}
@media screen and (max-width: 370px) and (hover: none) {
  body:not(.print-measure) .row-actions.oa .btn.sm { padding: 4px 4px; font-size: 11.5px; }
}
/* Excel dosyası görüntüleme */
.xl-wrap { overflow: auto; max-height: 65vh; border: 1px solid var(--line); border-radius: 6px; }
.xl { border-collapse: collapse; font-size: 12.5px; }
.xl td, .xl th { border: 1px solid #e3e6ec; padding: 4px 8px; white-space: nowrap; }
.xl td.num { text-align: right; }
.xl th.xl-n { background: #f0f2f6; color: #7a8194; font-weight: 500; position: sticky; left: 0; }
/* Kullanıcı yetkileri */
.perm-h { font-weight: 600; margin: 6px 0; }
.perm { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm th, .perm td { padding: 6px 8px; border-bottom: 1px solid #eceff4; text-align: start; }
.perm td.c, .perm th.c { text-align: center; width: 110px; }
.perm tr.g td { background: #f5f7fa; font-weight: 700; color: #3b4256; }
.perm td.pn { padding-inline-start: 22px; }
.perm input[type=checkbox] { width: 17px; height: 17px; }
.btn.ph { visibility: hidden; pointer-events: none; }
/* Menü: Tedarikçiler kahverengi, Diğer Şirket mor */
.ic.cbr { background: #6a4a2a; color: #e9c9a0; }
.ic.cvi { background: #5a3a7a; color: #dcc4f4; }
/* Sipariş satırı: kutusuz Göster / İndir ikonları butonlarla aynı yükseklikte (%95), işlem geçmişi %75 */
.row-actions.oa { --bh: 27.4px; }
.row-actions.oa .btn.fi { padding: 0 2px; color: #6b7286; display: inline-flex; align-items: center; }
.row-actions.oa .btn.fi:hover { color: var(--accent-2); }
.row-actions.oa .btn.fi svg { height: calc(var(--bh) * .95); width: calc(var(--bh) * .95 * .8); display: block; }
.row-actions.oa .btn.hist { padding: 0 2px; }
.row-actions.oa .btn.hist svg { height: calc(var(--bh) * .75); width: calc(var(--bh) * .75 * 21 / 18); }
.row-actions.oa .stg2 { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; flex: none; }
.row-actions.oa > * { flex-shrink: 0; }
.row-actions.oa .stg2 .btn { justify-content: center; text-align: center; white-space: nowrap; }
@media screen and (max-width: 900px) and (hover: none) {
  body:not(.print-measure) .row-actions.oa { gap: 2px; --bh: 29.4px; }
  body:not(.print-measure) .row-actions.oa .btn.fi, body:not(.print-measure) .row-actions.oa .btn.hist { padding: 0 1px; }
  body:not(.print-measure) .row-actions.oa .stg2 { gap: 3px; }
  body:not(.print-measure) .row-actions.oa .stg2 .btn { padding: 5px 3px; font-size: 12px; }
  body:not(.print-measure) .row-actions.oa .btn.link:not(.fi):not(.hist) { padding: 5px 0; font-size: 12px; }
  body:not(.print-measure) .row-actions.oa [data-oedit] { margin-inline-end: 5px; }
}
/* Sipariş tabloları: tek satır, daha dar sütun aralığı (uzun yazılar JS ile küçültülür) */
table.t.ord th, table.t.ord td { padding-left: 5.25px; padding-right: 5.25px; white-space: nowrap; }
table.t.ord td > .cv { white-space: nowrap; }
@media not all and (max-width: 700px) and (hover: none) {
  table.t.ord td:last-child { width: 1%; }
  table.t.ord td:last-child > .cv { display: block; width: max-content; margin-left: auto; }
}
@media screen and (max-width: 700px) and (hover: none) {
  body:not(.print-measure) table.t.ord td:not(:last-child) > .cv { white-space: nowrap; overflow: hidden; }
}
.hist-files-h { margin: 14px 0 6px; font-size: 13.5px; }
/* Sipariş Girişi araç çubuğu: "+ sayfa" ve "ok sayfa" ikonları; telefonda iki buton yan yana */
.ord-btns { display: contents; }
.btn .bi svg.ico2 { height: 17px; width: 27.5px; display: block; }
.req { color: var(--neg); }
@media screen and (max-width: 700px) and (hover: none) {
  .ord-btns { display: flex; gap: 8px; width: 100%; }
  .ord-btns .btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; padding: 8px 5px; gap: 5px; font-size: 12px; }
}
/* Yeni sipariş penceresi */
.sec-h { font-weight: 700; color: #3b4256; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 4px; }
.cust-pick { display: flex; gap: 8px; }
.cust-pick input { flex: 1; min-width: 0; }
.cinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 13px; background: #f6f7fa; border-radius: 8px; padding: 8px 12px; }
.cinfo .btn { margin-inline-start: auto; }
.cnew { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: #fff7e6; border-radius: 8px; padding: 10px 12px; }
.cnew-h { grid-column: 1 / -1; font-size: 12.5px; color: #8a5a00; display: flex; align-items: center; gap: 8px; }
.cnew-h .btn { margin-inline-start: auto; }
@media screen and (max-width: 700px) { .cnew { grid-template-columns: 1fr; } }
/* Sipariş formunun Excel düzeniyle gösterimi (Göster) */
.xs-wrap { overflow: auto; max-height: 72vh; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
table.xs { border-collapse: collapse; table-layout: fixed; width: max-content; background: #fff; color: #000; }
table.xs td { padding: 0 3px; overflow: hidden; white-space: nowrap; font-family: Arial, sans-serif; font-size: 13.3px; vertical-align: bottom; line-height: 1.15; }
.modal.wide:has(.xs-tb) { max-width: min(1100px, 96vw); }

/* Ortak kartı: hesap kesiminde payından düşülecekler */
.pk-rows { display: grid; gap: 2px; margin-top: 10px; font-size: 12.5px; }
.pk-rows .pk-t { font-size: 12px; margin-bottom: 2px; }
.pk-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); white-space: nowrap; }
.pk-rows div.sub { padding-left: 12px; color: var(--ink-2); }
.pk-rows div.sub a { color: inherit; overflow: hidden; text-overflow: ellipsis; }
.pk-rows div.tot { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 5px; }
.kpi.pkpi { min-width: 0; }
.kpis.pk-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* Otomatik yenileme bekleniyor çubuğu */
.live-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff;
  border-radius: 10px; padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
/* Ortak kartında fotoğraf düğmesi */
.pk-ph { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
.pk-ph .cam { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--panel); }
.pk-ph .cam svg { width: 10px; height: 10px; }
.pk-ph:hover .avatar { box-shadow: 0 0 0 2px var(--brand); }
.avatar.pk-av { width: 50px; height: 50px; font-size: 17px; }
/* Program içindeki sipariş formu */
.xf-bg { padding: 10px; align-items: stretch; }
.xf-modal { max-width: min(1240px, 98vw); width: 100%; display: flex; flex-direction: column; max-height: calc(100vh - 20px); }
.xf-modal .modal-h { gap: 12px; }
.xf-tb { display: flex; gap: 8px; align-items: center; padding: 8px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
.xf-tb .tabs button { padding: 6px 12px; }
.xf-zoom select { padding: 3px 6px; font-size: 12.5px; }
.xf-modal #xferr { margin: 8px 14px 0; }
.xf-body { flex: 1; min-height: 0; padding: 8px 14px 0; display: flex; flex-direction: column; }
.xf-body .xs-wrap { max-height: none; flex: 1; min-height: 0; }
.xf-hint { margin: 6px 14px 10px; }
table.xs td.ed { cursor: cell; box-shadow: inset 0 0 0 999px rgba(255, 213, 0, .13); }
table.xs td.ed:hover { box-shadow: inset 0 0 0 999px rgba(255, 196, 0, .28); }
table.xs td.ed.manual { box-shadow: inset 0 0 0 999px rgba(47, 111, 214, .16); }
table.xs td.editing { outline: 2px solid #2f6fd6; outline-offset: -2px; padding: 0 !important; box-shadow: none; }
.xf-in { width: 100%; height: 100%; min-height: 18px; border: 0; padding: 0 3px; margin: 0; font: inherit; color: #000; background: #fff;
  box-sizing: border-box; text-align: inherit; outline: none; border-radius: 0; }
select.xf-in { padding: 0; }
@media (max-width: 720px) { .xf-bg { padding: 0; } .xf-modal { max-height: 100vh; border-radius: 0; } .xf-zoom { display: none; } }
@media (max-width: 720px) { .xf-hint { display: none; } }
/* Ortak kartı (A düzeni): solda büyük fotoğraf, küçük satırlar */
.kpis.pk-grid { grid-template-columns: repeat(auto-fill, minmax(312px, 1fr)); }
.kpi.pkpi .pk2-top { display: flex; gap: 12px; align-items: center; }
.avatar.pk-big { width: 72px; height: 72px; font-size: 22px; }
.pk2-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.pk2-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.kpi.pkpi .pk2-top + .pk-rows { margin-top: 12px; }
@media (max-width: 720px) { .kpis.pk-grid { grid-template-columns: minmax(0, 1fr); } }
/* Sipariş formu: tam ekran, Excel gibi seçim */
.xf-bg { padding: 0 !important; }
.xf-modal { max-width: none !important; width: 100vw; height: 100vh; max-height: 100vh !important; border-radius: 0 !important; }
.xf-fx { display: flex; align-items: center; gap: 8px; padding: 5px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.xf-fx .nm { min-width: 64px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; font-family: monospace; background: #f7f7f7; }
.xf-fx .fxl { color: var(--muted); font-style: italic; }
.xf-fx .fx { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; min-height: 22px; background: #fff; font-family: Arial, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xf-bg:focus { outline: none; }
.xf-sheet { user-select: none; -webkit-user-select: none; }
table.xs td.sel { box-shadow: inset 0 0 0 999px rgba(33, 115, 70, .16) !important; }
table.xs td.act { outline: 2px solid #217346; outline-offset: -2px; }
table.xs td.ed { cursor: cell; }
table.xs td { cursor: cell; }
.ro-banner { margin: 8px 14px 0; padding: 8px 12px; border-radius: 8px; background: #eef2f7; color: #334; font-size: 13px; }
.xf-body .ro-banner { margin: 0 0 8px; }

/* ---------------- İş akışı ---------------- */
.stg-strip{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:12px;align-items:center}
.stg-chip{display:flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--line);border-radius:20px;background:var(--panel);font:inherit;font-size:12.5px;white-space:nowrap;cursor:pointer;color:inherit}
.stg-chip b{background:var(--line-2);border-radius:10px;padding:0 7px;font-size:12px}
.stg-chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.stg-chip.on b{background:rgba(255,255,255,.25);color:#fff}
.stg-arrow{color:var(--muted);font-size:12px}
.trk{display:flex;align-items:center;padding:4px 4px 0}
.trk i{display:block;width:13px;height:13px;border-radius:50%;background:#dfe3ea;border:2px solid #dfe3ea;flex:none;box-sizing:border-box}
.trk i.done{background:#2e9e5b;border-color:#2e9e5b}
.trk i.cur{background:#fff;border-color:#e08a00;box-shadow:0 0 0 3px rgba(224,138,0,.2)}
.trk s{display:block;width:12px;height:2px;background:#dfe3ea;text-decoration:none}
.trk s.done{background:#2e9e5b}
.trk-l{font-size:12px;font-weight:600;color:#b36b00;margin-top:3px;padding-left:2px;white-space:nowrap}
.trk-l.ok{color:#2e7d4f}
.trk-l.pre{color:var(--muted);margin:0}
table.wf td{vertical-align:middle}
td.wf-note{min-width:240px}
.note-row{display:flex;gap:6px;align-items:center}
.note-box{position:relative;flex:1;min-width:160px;height:28px}
.note-in{position:absolute;left:0;top:0;width:100%;height:28px;box-sizing:border-box;border:1px solid var(--line);border-radius:6px;padding:5px 8px;font:inherit;font-size:12.5px;line-height:16px;background:#fffdf3;resize:none;overflow:hidden;white-space:pre;display:block;margin:0;min-height:0}
@media (max-width:760px){.note-in{font-size:16px !important;line-height:18px;height:30px;padding:5px 8px}.note-box{height:30px}}
.note-in:focus{outline:none;border-color:var(--brand)}
.note-in.big{white-space:pre-wrap;overflow-wrap:anywhere;z-index:25;box-shadow:0 6px 18px rgba(0,0,0,.16)}
.note-ro{font-size:12.5px}
.mic{border:1px solid var(--line);background:#fff;border-radius:6px;width:30px;height:28px;flex:none;display:inline-grid;place-items:center;cursor:pointer;color:#374151;padding:0}
.mic:hover{border-color:var(--brand);color:var(--brand)}
.mic svg{width:15px;height:15px}
.mic.sm{width:26px;height:22px}
.note-meta{font-size:11px;color:var(--muted);margin-top:2px;white-space:nowrap}
.vlist{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;align-items:center}
.vchip{display:inline-flex;gap:4px;align-items:center;background:#eef2ff;color:#2a3a8a;border-radius:12px;padding:1px 8px;font-size:11.5px;white-space:nowrap;cursor:pointer;user-select:none;max-width:100%;min-width:0;box-sizing:border-box}
.vchip.play{background:#2a3a8a;color:#fff}.vchip.play i{color:#dbe2ff}
.vchip i{font-style:normal;color:#6b7280;overflow:hidden;text-overflow:ellipsis;min-width:0}
.vchip .vx{flex:none}
.vlist{max-width:100%;min-width:0}
.vchip .vx{color:#b91c1c;font-weight:700;padding-left:2px}
.wf-act{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.btn.done-btn{background:#2e9e5b;color:#fff;border-color:#2e9e5b;white-space:nowrap}
.btn.done-btn.skip{background:#fff;color:#2e7d4f;border-color:#2e9e5b}
.back-l{color:#b45309;font-size:12px;background:none;border:0;padding:0;cursor:pointer;font:inherit;font-size:12px}
.back-l:hover{text-decoration:underline}
.me-tag{display:inline-flex;gap:6px;align-items:center;font-size:12.5px;background:#eef6f0;color:#245c3a;border:1px solid #cfe6d7;border-radius:8px;padding:6px 10px}
.me-tag.none{background:#f4f5f7;color:var(--muted);border-color:var(--line)}
.pop{position:absolute;z-index:60;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:12px;width:310px;font-size:13px}
.pop h4{margin:0 0 8px;font-size:13.5px}
.pop label{display:flex;gap:8px;align-items:center;padding:5px 4px;cursor:pointer}
.pop label .small{margin-left:auto}
.pop label.dis{color:#aaa;cursor:default}
.pop .pb{display:flex;justify-content:flex-end;gap:6px;margin-top:8px}
.qno{font-weight:700;color:var(--brand);font-size:14px}
.ibs{display:inline-flex;gap:4px}
.ib{border:1px solid var(--line);background:#fff;border-radius:6px;width:28px;height:26px;display:inline-grid;place-items:center;color:#374151;cursor:pointer;padding:0}
.ib:hover:not(:disabled){border-color:var(--brand);color:var(--brand)}
.ib:disabled{opacity:.35;cursor:default}
.ib svg{width:16px;height:16px}
.rec{display:flex;align-items:center;gap:10px;font-size:15px;padding:8px 0}
.rec-dot{width:12px;height:12px;border-radius:50%;background:#dc2626;animation:recb 1s infinite}
@keyframes recb{50%{opacity:.25}}
.cnc-pick{display:flex;gap:6px}.cnc-pick select{flex:1;min-width:0}
b.sub{font-size:13px}
.drop{display:block;border:2px dashed #c7cdd8;border-radius:10px;padding:14px;text-align:center;color:var(--muted);font-size:13px;background:#fafbfc;margin-top:6px;cursor:pointer}
.drop.on{border-color:var(--brand);background:#f0f5ff}
.flist{margin-top:8px;display:grid;gap:4px}
.flist div{display:flex;justify-content:space-between;gap:8px;font-size:12.5px;padding:5px 8px;border:1px solid var(--line-2);border-radius:6px}
.x-sm{border:0;background:none;color:#b91c1c;cursor:pointer;font-size:14px;padding:0 0 0 6px}
.olist{display:grid;gap:3px;margin-top:4px;max-height:280px;overflow:auto}
.olist>div,.olist>label{display:flex;gap:10px;font-size:12.5px;padding:5px 8px;background:#f6f7f9;border-radius:6px;align-items:center}
.olist>label{cursor:pointer}
.cnc-cols{display:grid;grid-template-columns:repeat(var(--n,3),minmax(260px,1fr));gap:14px;align-items:start;overflow-x:auto}
.cnc-col{background:#eef1f5;border-radius:12px;padding:10px;min-width:0}
.cnc-h{display:flex;align-items:center;gap:10px;margin:0 0 8px}
.cnc-h h2{margin:0;font-size:16px}
.cnc-h .small{margin-left:auto}
.empty.sm{padding:14px;font-size:12.5px}
.qc{background:#fff;border:1px solid var(--line);border-radius:10px;margin-bottom:8px;overflow:hidden}
.qc-h{display:flex;align-items:center;gap:8px;padding:10px 12px 4px;cursor:pointer}
.qc-h b{font-size:14px}
.qc-h .car{margin-left:auto;color:var(--muted)}
.qc-s{font-size:11.5px;color:var(--muted);padding:0 12px 9px;cursor:default}
.qc.open{box-shadow:0 0 0 2px var(--brand)}
.qc-b{border-top:1px solid var(--line-2);padding:6px 8px 10px}
.qnote{font-size:12.5px;background:#fffdf3;border:1px solid #f1e6b8;border-radius:6px;padding:5px 8px;margin:2px 0 6px}
.qi{display:flex;align-items:center;gap:6px;font-size:12.5px;padding:4px 4px;border-bottom:1px dashed var(--line-2)}
.qi .g{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qi .row-actions{flex:none}
.qi .x{color:#b91c1c;border:0;background:none;font-size:16px;cursor:pointer;width:18px;padding:0;flex:none}
.qi .x.ph{visibility:hidden}
.qst{font-size:11px;font-weight:600;color:#b36b00;white-space:nowrap}.qst.ok{color:#2e7d4f}
.otag,.ftag{display:inline-block;border-radius:4px;padding:0 6px;font-size:10.5px;font-weight:700;flex:none}
.otag{background:#e8f5ee;color:#1f6b40}.ftag{background:#eef2ff;color:#2a3a8a}
.qa{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap;align-items:center}
.qa .grow{flex:1}
.qexp{font-size:11px;color:#9a6700;margin-top:6px}
.cnc-row{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.cnc-row input:not([type]){flex:1}
@media (max-width:760px){.cnc-cols{grid-template-columns:1fr}.stg-arrow{display:none}td.wf-note{min-width:200px}}
body:not(.print-measure) .qi .row-actions.oa{width:auto;justify-content:flex-end;gap:2px}
.qi .g{min-width:60px}

/* Sesli not kayıt çubuğu (WhatsApp tarzı) */
.wa{position:fixed;z-index:200;background:#fff;border-radius:28px;box-shadow:0 8px 28px rgba(0,0,0,.25);display:flex;align-items:center;gap:6px;padding:6px 6px 6px 8px;width:400px;max-width:calc(100vw - 16px);box-sizing:border-box}
.wa.sheet{left:8px;right:8px;bottom:12px;width:auto;max-width:none}
.wa .ic{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;border:0;background:none;color:#54656f;flex:none;cursor:pointer;padding:0}
.wa .ic:hover{background:#f0f2f5}
.wa .ic:disabled{opacity:.3;cursor:default;background:none}
.wa .ic svg{width:22px;height:22px}
.wa .ic.del{color:#8696a0}
.wa .ic.pause{color:#ea0038}
.wa .send{width:44px;height:44px;border-radius:50%;background:#00a884;color:#fff;display:grid;place-items:center;flex:none;border:0;cursor:pointer;padding:0}
.wa .send:hover{background:#008f72}
.wa .send svg{width:22px;height:22px;margin-left:3px}
.wa .mid{flex:1;display:flex;align-items:center;gap:8px;background:#f0f2f5;border-radius:20px;height:38px;padding:0 12px;min-width:0}
.wa .dot{width:10px;height:10px;border-radius:50%;background:#ea0038;flex:none;animation:recb 1s infinite}
.wa .t{font-size:14px;color:#3b4a54;font-variant-numeric:tabular-nums;flex:none;min-width:34px}
.wa .wave{flex:1;display:flex;align-items:center;gap:2px;height:26px;overflow:hidden;justify-content:flex-end;min-width:0}
.wa .wave.pl{justify-content:flex-start}
.wa .wave i{display:block;width:3px;border-radius:2px;background:#8696a0;flex:none}
.wa .wave.pl i{background:#c5ccd1}.wa .wave.pl i.p{background:#00a884}
.wa .play{color:#54656f;flex:none;display:grid;place-items:center;border:0;background:none;padding:0;cursor:pointer}
.wa .play svg{width:22px;height:22px}
.flash-c{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:300;background:rgba(17,24,39,.92);color:#fff;font-size:16px;font-weight:600;padding:14px 22px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.3);transition:opacity .4s;pointer-events:none;text-align:center;max-width:calc(100vw - 40px)}
.flash-c.out{opacity:0}
@media (max-width:760px){.note-meta{white-space:normal}}

/* Bildirimler */
.tb-bell{padding:5px 7px;display:inline-grid;place-items:center}
.tb-bell svg{width:17px;height:17px;display:block}
.push-ask{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:90;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:10px 12px;display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100vw - 20px);box-sizing:border-box;font-size:13px}
.push-ask .pa-ic{color:var(--brand);display:grid}.push-ask .pa-ic svg{width:22px;height:22px}
.push-ask .pa-t{flex:1;min-width:0}
@media (max-width:760px){.push-ask{flex-wrap:wrap;bottom:10px}.push-ask .pa-t{flex-basis:calc(100% - 40px)}}
.push-st{border-radius:10px;padding:10px 12px;font-size:13.5px}
.push-st.on{background:#eef6f0;color:#245c3a;border:1px solid #cfe6d7}
.push-st.off{background:#f4f5f7;color:var(--ink-2);border:1px solid var(--line)}
.push-evs{display:grid;gap:6px;margin-top:6px}
