/* Telefon görünümü ve genel okunabilirlik düzeltmeleri.
   Diğer stillerden SONRA yüklenir; yalnız ihtiyaç olan yerleri ezer. */

/* Form alanları uygulamanın yazı tipini kullansın (tarih ve not kutuları daktilo fontu gibi görünmesin) */
input, textarea, select, button { font-family: inherit; }

/* Durum etiketleri: koyu zemin üstünde koyu yazı okunmuyordu */
.badge { color: #fff; font-weight: 700; letter-spacing: .1px; vertical-align: 2px; }

/* Giriş ekranı: başlık koyu zeminde görünmüyordu, göz butonu yarım ekran kaplıyordu */
.login-card h1 { color: #fff; }
#loginForm > div:has(#loginPassword) { align-items: stretch; margin-bottom: 11px; }
#loginForm #loginPassword { margin-bottom: 0; flex: 1; min-width: 0; }
#togglePassword { flex: 0 0 54px; width: 54px !important; margin-top: 0 !important; padding: 0; }

/* İş listesi başlığı (filtre seçilmeden açık işler gösterilir) */
.job-list-title { display: flex; align-items: center; gap: 8px; margin: 4px 2px 10px; font-size: 16px; color: #344054; }
.job-list-title span { background: #eef1f5; color: #475467; border-radius: 999px; padding: 1px 9px; font-size: 13px; }

/* Cari: arama kutusu ve hareket satırları */
.ledger-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ledger-toolbar input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; }
.ledger-toolbar button { flex: 0 0 auto; width: auto; margin: 0; white-space: nowrap; border: 0; background: #22314b; color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 14px; }
.ledger-entry { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid #e4e8ef; padding: 9px 0; margin-top: 4px; }
.ledger-entry > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.ledger-entry small { display: block; color: #98a2b3; font-size: 12px; margin-top: 2px; }
.ledger-type { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.ledger-type.debt { background: #fee4e2; color: #b42318; }
.ledger-type.payment { background: #dcfae6; color: #067647; }
.ledger-entry-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.ledger-entry-actions button { width: auto; margin: 0; border: 0; background: #22314b; color: #fff; padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.ledger-entry-actions button.danger { background: #7f1d1d; }

/* Sohbet açıkken zil butonu "Gönder"in üstüne binmesin */
body:has(#chat details[open]) #notifyFab { display: none !important; }

/* ---------- Telefon (mobil çalışma modu) ---------- */
.mobile-work-mode .app { padding-bottom: 170px; }   /* son kart alttaki büyük buton ve yuvarlak butonların arkasında kalmasın */
.mobile-work-mode header span#who { max-width: calc(100vw - 120px); }

/* Durum kartları ekranın yarısını kaplıyordu: tek satırda 5 küçük kutu */
.mobile-work-mode .job-filters { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.mobile-work-mode .job-filters button { padding: 8px 4px 7px; gap: 0; align-items: center; text-align: center; border-radius: 10px; min-height: 64px; justify-content: flex-start; border-top-width: 3px; }
.mobile-work-mode .job-filters button:last-child { grid-column: auto; }
.mobile-work-mode .job-filters button b, .mobile-work-mode .filter-colon { display: none; }
.mobile-work-mode .job-filters button span { font-size: 10.5px; line-height: 1.15; font-weight: 600; color: #475467; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.mobile-work-mode .job-filters button strong { font-size: 20px; line-height: 1.1; color: #172033; }
.mobile-work-mode .job-filters .status-assigned { border-top-color: #f04438; }
.mobile-work-mode .job-filters .status-in_progress { border-top-color: #eaaa08; }
.mobile-work-mode .job-filters .status-submitted { border-top-color: #9e5cff; }
.mobile-work-mode .job-filters .status-revision_requested { border-top-color: #f79009; }
.mobile-work-mode .job-filters .status-approved { border-top-color: #12b76a; }
.mobile-work-mode .job-filters button.active { background: #ecfdf3; border-color: #12b76a; box-shadow: 0 0 0 2px #12b76a33; }

/* İş kartları: başlık ve butonlar parmakla rahat basılsın */
.mobile-work-mode .card h2 { font-size: 17px; line-height: 1.3; }
.mobile-work-mode .card .actions { gap: 8px; }
.mobile-work-mode .card .actions > a,
.mobile-work-mode .card .actions > button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }

/* Açılır pencereler telefonda ekrana tam otursun */
@media (max-width: 760px) {
  dialog { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; max-height: calc(100dvh - 24px); }
  dialog table { width: 100%; font-size: 14px; }
  .ledger-entry { flex-wrap: wrap; }
}
.filter-colon { font-style: normal; }

/* Müşteri iş geçmişi */
.actions .history-btn { background: #eef4ff; color: #1849a9; }
.history-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.history-summary span { background: #f2f4f7; border-radius: 999px; padding: 4px 11px; font-size: 13px; color: #475467; }
.history-item { border: 1px solid #e4e8ef; border-radius: 12px; padding: 11px 12px; margin-bottom: 9px; }
.history-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.history-head b { font-size: 15px; }
.history-item p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.history-note { background: #f9fafb; border-radius: 8px; padding: 6px 8px; }

/* İş kapanışı: ücret ve konum */
.fee-box { border: 1px solid #d0d5dd; border-radius: 12px; padding: 10px 12px 12px; margin: 10px 0; }
.fee-box legend { font-weight: 700; padding: 0 6px; color: #172033; }
.fee-box > p { margin: 0 0 8px; }
.fee-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 92px 30px; gap: 6px; margin-bottom: 6px; align-items: center; }
.fee-line input, .fee-line select { padding: 10px 9px; font-size: 15px; margin: 0; }
.fee-line .fee-remove { width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: #fee4e2; color: #b42318; font-size: 18px; line-height: 1; text-align: center; }
.fee-box .fee-add { width: 100%; margin: 2px 0 8px; font-size: 14px; }
.fee-none { display: flex !important; align-items: center; gap: 8px; color: #344054 !important; font-size: 14px; }
.fee-none input { width: auto; margin: 0; }
@media (max-width: 480px) {
  .fee-line { grid-template-columns: minmax(0, 1fr) 84px 30px; }
  .fee-line input[name="feeDescription"] { grid-column: 1 / -1; }
}
.gps-box { border: 2px dashed #f79009; background: #fffaeb; border-radius: 12px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 6px; }
.gps-box p { margin: 0; font-size: 14px; color: #475467; }
.gps-box button { width: 100%; margin: 0; }
.gps-box.done { border-style: solid; border-color: #12b76a; background: #ecfdf3; }
.gps-ok { background: #ecfdf3; color: #067647; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.close-summary { display: grid; gap: 2px; background: #f2f4f7; border-radius: 10px; padding: 9px 11px; margin-bottom: 4px; }
.close-summary span { color: #667085; font-size: 14px; }
.gps-tag { display: inline-block; background: #ecfdf3; color: #067647; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 700; margin-left: 4px; }
.customer-map-link { color: #175cd3; font-weight: 600; text-decoration: none; }

/* İş kartı: müşteri adı en üstte, ne yapılacağı altında, sonra tarih ve atanan kişi */
.job-card .job-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-card h2.job-customer { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; color: #101828; overflow-wrap: anywhere; }
.job-card .job-card-head .badge { flex: 0 0 auto; margin: 3px 0 0; }
.job-card .job-what { margin: 8px 0 10px; padding: 9px 12px; background: #f6f8fb; border-left: 3px solid #12b7a6; border-radius: 0 8px 8px 0; }
.job-card .job-what b { display: block; font-size: 15.5px; color: #172033; }
.job-card .job-what p { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: #344054; white-space: pre-line; overflow-wrap: anywhere; }
.job-card .job-facts { display: grid; gap: 4px; margin: 0 0 12px; }
.job-card .job-facts > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.job-card .job-facts dt { font-size: 13px; color: #667085; }
.job-card .job-facts dd { margin: 0; font-size: 14.5px; color: #172033; font-weight: 600; overflow-wrap: anywhere; }
.job-card .job-facts .muted { color: #98a2b3; font-weight: 500; }
.mobile-work-mode .job-card h2.job-customer { font-size: 19px; }

/* Okunabilir renkler: durum etiketleri açık zemin + koyu yazı */
.badge { border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.badge.assigned { background: #eef2f6; color: #1f2a37; border-color: #cfd8e3; }
.badge.in_progress { background: #dbeafe; color: #1e3a8a; border-color: #bfd3fb; }
.badge.submitted { background: #fef3c7; color: #7c2d12; border-color: #f8d98b; }
.badge.revision_requested { background: #fee2e2; color: #8f1d1d; border-color: #fbc5c5; }
.badge.approved { background: #dcfce7; color: #14532d; border-color: #b4ebc8; }

/* İş kartı butonları: beyaz yazı + güçlü zemin; Düzenle/Sil sade çerçeveli */
.job-card .actions > a,
.job-card .actions > button { font-weight: 650; font-size: 14px; border-radius: 10px; padding: 9px 14px; border: 1.5px solid transparent; color: #fff; }
.job-card .actions .job-directions { background: #1d4ed8; }
.job-card .actions [data-act="start"] { background: #15803d; }
.job-card .actions [data-submit-job] { background: #b45309; }
.job-card .actions [data-close-job],
.job-card .actions [data-review-job] { background: #0f766e; }
.job-card .actions [data-act="editJob"] { background: #fff; color: #1f2a37; border-color: #98a2b3; }
.job-card .actions [data-act="deleteJob"] { background: #fff; color: #b42318; border-color: #f1a7a1; }
.job-card .actions > a:focus-visible, .job-card .actions > button:focus-visible { outline: 3px solid #1d4ed855; outline-offset: 2px; }

/* ---------- Telefonda daha küçük, dengeli yazı boyutları ---------- */
.mobile-work-mode main { font-size: 14px; }
.mobile-work-mode header h1 { font-size: 15px !important; }
.mobile-work-mode header span#who { font-size: 12px; }
.mobile-work-mode .header-actions .icon { font-size: 11px; }
.mobile-work-mode nav button { font-size: 13px; padding: 8px 6px; }
.mobile-work-mode .page-title h2, .mobile-work-mode .section-title h2 { font-size: 19px; }
.mobile-work-mode .page-title span, .mobile-work-mode .section-title span { font-size: 13px; }
.mobile-work-mode .job-list-title { font-size: 14px; }
.mobile-work-mode .card h2 { font-size: 15px; }
.mobile-work-mode .meta { font-size: 12.5px; }
.mobile-work-mode .detail { font-size: 14px; }
.mobile-work-mode .card .actions > a,
.mobile-work-mode .card .actions > button { font-size: 12.5px; padding: 7px 11px; min-height: 36px; }
.mobile-work-mode .job-card h2.job-customer { font-size: 16.5px; }
.mobile-work-mode .job-card .badge { font-size: 11px; padding: 2px 8px; }
.mobile-work-mode .job-card .job-what { padding: 7px 10px; margin: 6px 0 8px; }
.mobile-work-mode .job-card .job-what b { font-size: 13.5px; }
.mobile-work-mode .job-card .job-what p { font-size: 13px; }
.mobile-work-mode .job-card .job-facts { gap: 2px; margin-bottom: 10px; }
.mobile-work-mode .job-card .job-facts > div { grid-template-columns: 82px minmax(0, 1fr); }
.mobile-work-mode .job-card .job-facts dt { font-size: 12px; }
.mobile-work-mode .job-card .job-facts dd { font-size: 13px; }
.mobile-work-mode .job-filters button strong { font-size: 17px; }
.mobile-work-mode .job-filters button { min-height: 56px; }
.mobile-work-mode .fab { font-size: 15px; padding: 13px; border-radius: 14px; bottom: 14px; }
.mobile-work-mode #notifyFab { width: 44px; height: 44px; font-size: 19px; bottom: 76px !important; }
.mobile-work-mode #chat:has(details:not([open])) { bottom: 76px !important; }
.mobile-work-mode .ledger-entry { font-size: 13.5px; }
.mobile-work-mode .history-item p { font-size: 13px; }
.mobile-work-mode dialog h2, .mobile-work-mode #modalTitle { font-size: 20px; }
.mobile-work-mode dialog label { font-size: 13px; }

/* Durum değiştirme */
.job-card .actions [data-status-job] { background: #fff; color: #1e3a8a; border-color: #9db8f2; }
.status-options { display: grid; gap: 8px; margin-top: 10px; }
.status-option { display: grid !important; grid-template-columns: 22px auto 1fr; align-items: center; gap: 10px; border: 1.5px solid #e4e8ef; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: #344054 !important; }
.status-option input { width: 18px; height: 18px; margin: 0; accent-color: #0f766e; }
.status-option small { color: #667085; font-size: 12.5px; }
.status-option:has(input:checked) { border-color: #0f766e; background: #f0fdfa; }

/* Müşteri teknik bilgileri */
.isp-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; background: #eef4ff; color: #1e3a8a; border: 1px solid #c7d7fe; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.actions .tech-btn { background: #f4f3ff; color: #4a1fb8; }
.tech-view section { border: 1px solid #e4e8ef; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.tech-view h3, .tech-edit h3 { margin: 0 0 8px; font-size: 15px; color: #172033; }
.tech-edit h3 { margin-top: 14px; }
.tech-kv { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 6px 10px; align-items: baseline; font-size: 14px; }
.tech-kv > span { color: #667085; font-size: 13px; }
.tech-row { display: grid; gap: 3px; padding: 8px 0; border-top: 1px solid #f0f2f5; font-size: 14px; }
.tech-row:first-of-type { border-top: 0; padding-top: 0; }
.tech-row small { color: #667085; }
.tech-view code, .tech-row code { background: #f2f4f7; border-radius: 6px; padding: 1px 6px; font-size: 13.5px; user-select: all; }
.secret-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fffaeb; border: 1px solid #fde4a7; border-radius: 6px; padding: 1px 8px; font-size: 14px; }
.secret-show, .secret-copy { width: auto !important; margin: 0 !important; padding: 4px 10px !important; font-size: 12.5px !important; border-radius: 7px !important; border: 1px solid #d0d5dd !important; background: #fff !important; color: #344054 !important; }
.tech-view .muted, .tech-row .muted { color: #98a2b3; }
.tech-edit-btn { width: 100%; margin-bottom: 6px; }
.tech-edit-row { display: grid; gap: 6px; padding: 10px; border: 1px solid #e4e8ef; border-radius: 10px; margin-bottom: 8px; position: relative; }
.tech-edit-row input, .tech-edit-row select { margin: 0; padding: 10px; font-size: 15px; }
.secret-row { grid-template-columns: 1fr 1fr 1fr 30px; }
.device-row { grid-template-columns: 150px 1fr 1fr 30px; }
.device-row select { grid-column: 1; }
.device-row [name="deviceModel"] { grid-column: 2 / 4; }
.device-row [name="deviceIp"] { grid-column: 1; }
.device-row [name="deviceUser"] { grid-column: 2; }
.device-row [name="devicePass"] { grid-column: 3; }
.device-row [name="deviceNote"] { grid-column: 1 / 4; }
.device-row .row-remove { grid-column: 4; grid-row: 1; }
.tech-edit-row .row-remove { width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: #fee4e2; color: #b42318; font-size: 18px; line-height: 1; text-align: center; align-self: center; }
.tech-edit > .secondary { width: 100%; margin: 0 0 4px; }
@media (max-width: 560px) {
  .secret-row, .device-row { grid-template-columns: 1fr 1fr 30px; }
  .secret-row [name="secretLabel"] { grid-column: 1 / 3; }
  .secret-row .row-remove { grid-column: 3; grid-row: 1; }
  .device-row select { grid-column: 1; }
  .device-row [name="deviceModel"] { grid-column: 2; }
  .device-row [name="deviceIp"] { grid-column: 1 / 3; }
  .device-row [name="deviceUser"] { grid-column: 1; }
  .device-row [name="devicePass"] { grid-column: 2; }
  .device-row [name="deviceNote"] { grid-column: 1 / 3; }
  .device-row .row-remove { grid-column: 3; grid-row: 1; }
}
.fee-box.fee-free [name="feeAmount"], .fee-box.fee-free [name="feeCurrency"] { opacity: .45; }
.isp-line { margin: -2px 0 6px; font-size: 13.5px; color: #475467; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.isp-line .isp-tag { margin-left: 0; vertical-align: baseline; }

/* İş kartı: çerçeve + durum şeridi + üç bölüm (başlık / bilgiler / butonlar) */
.card.job-card { padding: 0 !important; overflow: hidden; border: 1.5px solid #cfd8e3; border-left: 6px solid #98a2b3; border-radius: 14px; margin-bottom: 14px; box-shadow: 0 2px 6px #1018280f; background: #fff; }
.job-card.st-assigned { border-left-color: #667085; }
.job-card.st-in_progress { border-left-color: #2563eb; }
.job-card.st-submitted { border-left-color: #d97706; }
.job-card.st-revision_requested { border-left-color: #dc2626; }
.job-card.st-approved { border-left-color: #16a34a; }
.job-card .job-card-head { padding: 12px 14px 10px; border-bottom: 1px solid #e9edf2; align-items: center; }
.job-card .job-card-head .badge { margin: 0; }
.job-card .job-card-body { padding: 10px 14px 4px; }
.job-card .job-card-body .job-what { margin-top: 0; }
.job-card .job-card-actions { margin: 0; padding: 10px 14px; background: #f7f9fb; border-top: 1px solid #e9edf2; }
.mobile-work-mode .job-card .job-card-head { padding: 10px 12px 8px; }
.mobile-work-mode .job-card .job-card-body { padding: 8px 12px 2px; }
.mobile-work-mode .job-card .job-card-actions { padding: 9px 12px; }
.job-card .job-what { border-left: 0; border-radius: 8px; }

/* Kısa butonlar: Düzenle/Sil simge, diğerleri kısa ad */
.job-card .actions > .icon-btn { padding: 0 !important; width: 40px; min-width: 40px; height: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.job-card .actions { flex-wrap: wrap; gap: 6px; }
.mobile-work-mode .job-card .actions > a, .mobile-work-mode .job-card .actions > button { padding: 7px 10px; }
.mobile-work-mode .job-card .actions > .icon-btn { width: 36px; min-width: 36px; height: 36px; }
/* Telefonda tüm iş butonları tek satıra sığsın */
.mobile-work-mode .job-card .actions { gap: 5px; flex-wrap: nowrap; }
.mobile-work-mode .job-card .actions > a, .mobile-work-mode .job-card .actions > button { padding: 6px 9px; font-size: 12px; min-height: 34px; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.mobile-work-mode .job-card .actions > .icon-btn { width: 34px; min-width: 34px; height: 34px; min-height: 34px; flex: 0 0 34px; }
.mobile-work-mode .job-card .actions > .icon-btn svg { width: 17px; height: 17px; }
@media (max-width: 340px) { .mobile-work-mode .job-card .actions { flex-wrap: wrap; } }

/* Borçlular */
.debt-summary { display: flex; justify-content: space-between; align-items: stretch; gap: 12px; background: #fff; border: 1.5px solid #f3c7c3; border-left: 6px solid #d92d20; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.debt-summary-main span { font-size: 13px; color: #667085; }
.debt-amounts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.debt-amounts b { font-size: 22px; color: #b42318; }
.debt-summary small { display: block; color: #667085; margin-top: 4px; font-size: 12.5px; }
.debt-summary-count { text-align: center; display: grid; align-content: center; padding-left: 12px; border-left: 1px solid #f0f2f5; }
.debt-summary-count b { font-size: 26px; color: #172033; }
.debt-summary-count span { font-size: 12px; color: #667085; }
.card.debtor-card { border: 1.5px solid #cfd8e3; border-left: 6px solid #d92d20; border-radius: 14px; }
.debtor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.debtor-head h2 { margin: 0; font-size: 17px; }
.debtor-amounts { text-align: right; display: grid; gap: 2px; }
.debtor-amounts b { color: #b42318; font-size: 16px; white-space: nowrap; }
.debtor-facts { display: grid; gap: 3px; margin: 10px 0; }
.debtor-facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; }
.debtor-facts dt { color: #667085; font-size: 13px; }
.debtor-facts dd { margin: 0; font-size: 14px; font-weight: 600; color: #172033; }
.debtor-facts .muted { color: #98a2b3; font-weight: 500; }
.debtor-actions .debtor-call { background: #1d4ed8; color: #fff; }
.debtor-actions .debtor-wa { background: #15803d; color: #fff; }
.mobile-work-mode .debt-amounts b { font-size: 18px; }
.mobile-work-mode .debtor-head h2 { font-size: 15.5px; }
.mobile-work-mode .debtor-facts > div { grid-template-columns: 130px minmax(0, 1fr); }
.mobile-work-mode .debtor-facts dt { font-size: 12px; }
.mobile-work-mode .debtor-facts dd { font-size: 13px; }
.mobile-work-mode nav button { min-width: 0; padding: 8px 4px; }

/* Stok arama ve Parasal aktarımı */
.svc-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; background: #f4f3ff; color: #5925dc; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.import-plan { display: grid; gap: 8px; margin: 10px 0; }
.import-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; border: 1px solid #e4e8ef; border-radius: 10px; padding: 9px 12px; }
.import-row b { font-size: 22px; text-align: center; color: #172033; }
.import-row span { font-size: 14px; color: #475467; }
.import-row.new { border-color: #b4ebc8; background: #f0fdf4; }
.import-row.upd { border-color: #c7d7fe; background: #f5f8ff; }
.ledger-toolbar:has(#bulkStock) { flex-wrap: wrap; }
.mobile-work-mode .ledger-toolbar:has(#bulkStock) input { flex: 1 1 100%; }
.mobile-work-mode .ledger-toolbar:has(#bulkStock) button { flex: 1 1 0; font-size: 13px; padding: 10px 8px; }

/* Aramalı müşteri seçimi */
.customer-picker { display: grid; gap: 4px; margin: 4px 0 6px; }
.customer-picker .customer-search { margin: 0; padding: 11px 13px; border-radius: 10px; border: 1.5px solid #9db8f2; background: #f8faff; }
.customer-picker .customer-search-info { color: #475467; font-size: 12.5px; min-height: 0; }

/* Parasal muhasebe durumu */
.acc-chip { display: inline-block; border-radius: 8px; padding: 2px 8px; font-size: 12.5px; font-weight: 700; }
.acc-chip.pending { background: #fef3c7; color: #7c2d12; }
.acc-chip.posted { background: #dcfce7; color: #14532d; }
.acc-chip.error { background: #fee2e2; color: #8f1d1d; }
.acc-chip.none { background: #f2f4f7; color: #475467; }
.acc-retry { width: auto !important; margin: 4px 0 0 !important; padding: 4px 10px !important; font-size: 12.5px !important; border-radius: 8px !important; border: 1px solid #d0d5dd !important; background: #fff !important; color: #344054 !important; display: block; }
.acc-note { background: #eef4ff; color: #1e3a8a; border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.mat-line { display: grid !important; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid #f0f2f5; color: #172033 !important; font-size: 14px; }
.mat-line input { width: 18px; height: 18px; margin: 0; }
.mat-line em { font-style: normal; color: #475467; font-size: 13px; }

/* Parasal bakiyesi */
.parasal-sync-line { background: #eef4ff; color: #1e3a8a; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.old-ledger { margin: 8px 0 4px; border: 1px dashed #d0d5dd; border-radius: 10px; padding: 6px 10px; }
.old-ledger summary { cursor: pointer; font-size: 13px; color: #475467; font-weight: 600; }
.ledger-customer .muted { color: #98a2b3; }
.more-btn { width: 100%; margin: 4px 0 12px; }
.debtor-actions .debtor-parasal { background: #0f766e; color: #fff; }
.ledger-customer .negative, .debtor-amounts b { color: #b42318 !important; font-weight: 800; }

/* Stoktan fiyatlı ürün arama */
.stock-picker{margin:6px 0 8px}
.stock-picker input[type=search]{width:100%;font-size:15px;padding:10px 12px;border:1.5px solid #2563eb;border-radius:10px;background:#fff}
.stock-results{display:flex;flex-direction:column;gap:4px;margin-top:6px;max-height:260px;overflow:auto}
.stock-results:empty{display:none}
.stock-hit{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:2px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;color:#0f172a;width:100%;min-height:0}
.stock-hit b{font-size:14px;font-weight:600;line-height:1.25}
.stock-hit span{font-size:12.5px;color:#475569}
.stock-hit em{font-style:normal;font-weight:700;color:#047857}
.stock-hit:active{background:#dbeafe}
.stock-pick-title{margin:4px 0 0;font-weight:700;font-size:14px}
.stock-grid-compact label:first-child{display:none}
.stock-grid-compact #addJobStock{display:none}
#closeMatList .mat-line{display:grid;grid-template-columns:auto 1fr auto auto auto;align-items:center;gap:8px;padding:7px 0;border-top:1px solid #e2e8f0}
#closeMatList .mat-line.off{opacity:.5}
#closeMatList .mat-name{display:flex;flex-direction:column;min-width:0}
#closeMatList .mat-name b{font-size:14px;font-weight:600;overflow-wrap:anywhere}
#closeMatList .mat-name small{font-size:11.5px;color:#64748b}
#closeMatList .mat-qty{width:58px;padding:6px;font-size:14px;text-align:center}
#closeMatList .mat-q{font-size:13px;color:#334155}
#closeMatList em{font-style:normal;font-weight:700;color:#047857;font-size:13.5px;white-space:nowrap}
#closeMatList .mat-del{min-height:0;padding:4px 8px;background:#fee2e2;color:#b91c1c;border:0;border-radius:7px}
.mat-total{margin:6px 0 0;text-align:right;font-size:14px}
.used-price{font-style:normal;font-weight:700;color:#047857;margin-left:4px;white-space:nowrap}

/* Müşteri haritası */
.cmap{height:min(68vh,640px);border-radius:12px;border:1px solid #e2e8f0;overflow:hidden;background:#e8eef5;position:relative;z-index:0}
.cmap-bar{display:flex;gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.cmap-bar input[type=search]{flex:1 1 200px;min-width:0;padding:9px 11px;font-size:15px}
.cmap-approx{display:flex;align-items:center;gap:6px;font-size:13px;color:#334155;white-space:nowrap}
.cmap-approx input{width:auto;margin:0}
.cmap-legend{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.cmap-legend button{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1.5px solid var(--c,#cbd5e1);background:#fff;color:#0f172a;font-size:13px;font-weight:600;min-height:0;width:auto}
.cmap-legend button i{width:11px;height:11px;border-radius:50%;background:var(--c)}
.cmap-legend button b{font-weight:700;color:var(--c)}
.cmap-legend button.on{background:var(--c);color:#fff}.cmap-legend button.on b{color:#fff}.cmap-legend button.on i{background:#fff}
.cmap-legend button.all{border-color:#94a3b8;color:#334155}
.cmap-results{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.cmap-results:empty{display:none}
.cmap-results button{display:flex;justify-content:space-between;gap:8px;text-align:left;padding:8px 10px;border:1px solid #cbd5e1;border-radius:9px;background:#f8fafc;color:#0f172a;min-height:0;width:100%}
.cmap-results button span{font-size:12px;color:#475569;white-space:nowrap}
.cmap-label{background:none;border:0}
.cmap-label span{display:inline-block;transform:translate(-50%,-50%);font-weight:800;font-size:13px;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;text-shadow:0 0 3px #fff,0 0 3px #fff,0 0 6px #fff;pointer-events:none}
.cmap-pop{display:flex;flex-direction:column;gap:3px;min-width:170px;font-size:13px}
.cmap-pop b{font-size:14px}.cmap-pop em{font-style:normal;font-weight:700;font-size:12px}.cmap-pop span{color:#475569}
.cmap-pop .cmap-go{margin-top:4px;display:inline-block;background:#175cd3;color:#fff!important;padding:6px 10px;border-radius:8px;text-align:center;text-decoration:none;font-weight:700}
.cmap-note{margin:6px 2px;font-size:12px}
.cmap-miss{margin-top:8px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:8px 12px}
.cmap-miss summary{cursor:pointer;font-weight:600;font-size:14px}
.cmap-miss div{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.cmap-miss div span{font-size:12px;background:#f1f5f9;border-radius:6px;padding:3px 7px}
@media(max-width:760px){.cmap{height:62vh}}
.pick-map{height:min(52vh,420px);border-radius:10px;border:1px solid #cbd5e1;margin:6px 0;background:#e8eef5}
.pick-tools{display:flex;gap:6px;flex-wrap:wrap}.pick-tools button{flex:1 1 auto;min-height:0;padding:8px 10px;font-size:13px;width:auto}
.map-btn{background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}.map-btn.has-loc{background:#f0f9ff;color:#075985;border-color:#bae6fd}
.cmap-pop .cmap-fix{margin-top:4px;min-height:0;padding:6px 10px;border-radius:8px;border:1px solid #cbd5e1;background:#f8fafc;color:#0f172a;font-size:12.5px;font-weight:600;width:100%}
.cmap-miss div button{font-size:12px;background:#f1f5f9;border:0;border-radius:6px;padding:4px 8px;min-height:0;width:auto;color:#0f172a}
.pick-pin{font-size:30px;line-height:34px;text-align:center;background:none;border:0;filter:drop-shadow(0 2px 2px #0006)}
/* Müşteri Haritası: Açık İşler bölümü */
.cmap-open{background:#fff;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:10px;overflow:hidden}
.cmap-open summary{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 13px;cursor:pointer;font-weight:700;font-size:15px;color:#0f172a;list-style:none}
.cmap-open summary::-webkit-details-marker{display:none}
.cmap-open summary b{background:#dc2626;color:#fff;border-radius:999px;padding:2px 10px;font-size:13px}
.cmap-open[open] summary{border-bottom:1px solid #eef2f7}
.cmap-tabs{display:flex;gap:6px;padding:8px 10px;overflow-x:auto}
.cmap-tabs button{flex:0 0 auto;width:auto;min-height:0;padding:6px 11px;border-radius:999px;border:1px solid #cbd5e1;background:#f8fafc;color:#334155;font-size:13px;font-weight:600}
.cmap-tabs button b{color:#0f172a;margin-left:2px}
.cmap-tabs button.on{background:#0f172a;border-color:#0f172a;color:#fff}.cmap-tabs button.on b{color:#fff}
.cmap-jobs{display:flex;flex-direction:column;padding:0 8px 4px}
.cmap-job{display:flex;align-items:center;gap:10px;width:100%;min-height:0;text-align:left;padding:9px 6px;border:0;border-top:1px solid #f1f5f9;background:none;color:#0f172a;border-radius:0}
.cmap-job:first-child{border-top:0}
.cmap-job>i{flex:0 0 10px;height:10px;border-radius:50%;background:var(--jc)}
.cmap-job div{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.cmap-job div b{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmap-job div span{font-size:13px;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmap-job div small,.cmap-job aside small{font-size:11.5px;color:#64748b}
.cmap-job aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.cmap-job aside em{font-style:normal;font-size:12px;font-weight:700;color:#475569;background:#f1f5f9;border-radius:6px;padding:2px 6px}
.cmap-job aside em.mid{background:#fef3c7;color:#92400e}.cmap-job aside em.old{background:#fee2e2;color:#b91c1c}
.cmap-more{display:block;width:calc(100% - 16px);margin:2px 8px 10px;min-height:0;padding:8px;border:1px dashed #cbd5e1;border-radius:9px;background:#f8fafc;color:#334155;font-size:13px;font-weight:600}
.cmap-none{padding:4px 14px 12px}
.cmap-jpin-wrap{background:none;border:0}
.cmap-jpin{display:block;width:30px;height:30px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--jc);border:2.5px solid #fff;box-shadow:0 2px 6px #0006}
.cmap-jpin i{display:grid;place-items:center;width:100%;height:100%;transform:rotate(45deg);color:#fff;font-style:normal;font-weight:900;font-size:13px}
.cmap-pjob{display:flex;flex-direction:column;gap:1px;padding:5px 0;border-top:1px solid #eef2f7}
.cmap-pjob small{color:#64748b;font-size:11.5px}
.cust-pchip{display:inline-block;margin:2px 0 6px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600}
.cust-pchip.wait{background:#fef3c7;color:#92400e}.cust-pchip.ok{background:#dcfce7;color:#166534}.cust-pchip.err{background:#fee2e2;color:#991b1b;border-radius:9px}
.cust-pchip button{min-height:0;padding:2px 8px;margin-left:4px;font-size:12px;width:auto;border-radius:7px;background:#fff;color:#991b1b;border:1px solid #fca5a5}
/* Stok arama sonuçları: kutular sıkışıp yazıyı kesmesin */
.stock-results .stock-hit{flex:0 0 auto!important;height:auto!important;max-height:none!important;min-height:44px!important;white-space:normal!important;line-height:1.3!important;overflow:visible!important;padding:9px 12px!important}
.stock-results .stock-hit b{display:block;white-space:normal;overflow-wrap:anywhere}
.stock-results .stock-hit span{display:block;white-space:normal}
.stock-results{max-height:min(46vh,340px)!important}
/* Satış ekranı (Parasal'a giden satış) */
.manual-sale{display:grid;grid-template-columns:1fr 64px;gap:6px}
.manual-sale #msName{grid-column:1/-1}
.manual-sale #msPrice{grid-column:1/2}
.manual-sale #msCur{grid-column:2/3;padding-left:6px;padding-right:6px}
.manual-sale #msAdd{grid-column:1/-1;min-height:0;padding:9px}
.sale-card .sale-lines{display:flex;flex-direction:column;gap:3px;margin:4px 0;font-size:14px}
.sale-card .sale-lines div{display:flex;justify-content:space-between;gap:8px}
.sale-card .sale-lines em{font-style:normal;font-weight:600;white-space:nowrap}
.sale-card .acc-row{margin-top:6px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.section-title span{display:block;font-size:12.5px}
/* Ortak kalem düzenleyici (iş kapatma / incelemeye gönderme) */
.le-manual{display:grid;grid-template-columns:64px 1fr 92px;gap:6px;margin:8px 0}
.le-manual #leName{grid-column:1/-1}
.le-manual #leAdd{grid-column:1/-1;min-height:0;padding:9px}
.le-manual select{padding-left:6px;padding-right:4px}
#leList{display:flex;flex-direction:column;gap:6px}
.le-line{border:1px solid #e2e8f0;border-radius:10px;padding:7px 9px;background:#f8fafc}
.le-top{display:flex;align-items:center;gap:6px}
.le-top b{flex:1;font-size:14px;font-weight:600;overflow-wrap:anywhere;line-height:1.25}
.le-top small{font-size:11px;color:#64748b;white-space:nowrap}
.le-del{min-height:0!important;width:auto!important;padding:3px 8px!important;background:#fee2e2!important;color:#b91c1c!important;border:0!important;border-radius:7px!important}
.le-bottom{display:grid;grid-template-columns:54px auto 1fr 84px;gap:5px;align-items:center;margin-top:5px}
.le-bottom input,.le-bottom select{padding:6px;font-size:14px;min-height:0}
.le-bottom input[data-le-qty]{text-align:center}
.le-bottom span{color:#64748b}
.le-bottom em{grid-column:1/-1;text-align:right;font-style:normal;font-weight:700;color:#047857;font-size:13.5px}
.le-box.le-off #leList,.le-box.le-off .le-manual,.le-box.le-off .stock-picker{opacity:.35;pointer-events:none}
.le-free{margin-top:8px}
.photo-thumbs{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.photo-thumbs span{position:relative}
.photo-thumbs img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid #cbd5e1}
.photo-thumbs button{position:absolute;top:-6px;right:-6px;min-height:0;width:22px;height:22px;padding:0;border-radius:50%;background:#b91c1c;color:#fff;border:2px solid #fff;font-size:11px;line-height:1}
.close-summary small{display:block;margin-top:4px;color:#475569;font-size:12.5px}
/* Araç uyarısı */
.veh-banner{display:flex;align-items:stretch;gap:0;margin:0 0 10px;border-radius:12px;overflow:hidden;border:1.5px solid}
.veh-banner.red{background:#fef2f2;border-color:#fca5a5;color:#991b1b}
.veh-banner.amber{background:#fffbeb;border-color:#fcd34d;color:#92400e}
.veh-banner .veh-go{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;background:none;border:0;color:inherit;padding:9px 12px;min-height:0;width:auto;font-size:13px;line-height:1.35}
.veh-banner .veh-go b{font-size:14px}
.veh-banner .veh-x{background:none;border:0;color:inherit;min-height:0;width:auto;padding:0 12px;font-size:15px;opacity:.7}
.veh-card h2 small{font-size:13px;font-weight:500;color:#64748b;margin-left:4px}
.veh-row{display:grid;grid-template-columns:90px 1fr auto;gap:8px;align-items:center;padding:6px 8px;border-radius:8px;margin:3px 0;font-size:13.5px;background:#f8fafc}
.veh-row b{font-weight:600}.veh-row em{font-style:normal;font-weight:700;font-size:12.5px;white-space:nowrap}
.veh-row.ok em{color:#047857}.veh-row.amber{background:#fffbeb}.veh-row.amber em{color:#b45309}.veh-row.red{background:#fef2f2}.veh-row.red em{color:#b91c1c}
/* CSV indir */
.csv-bar{display:flex;justify-content:flex-end;margin:0 0 6px}
.csv-bar button{min-height:0;width:auto;padding:6px 12px;font-size:13px;font-weight:600;border-radius:999px;background:#fff;color:#0f766e;border:1.5px solid #99f6e4}
.csv-bar button:active{background:#ccfbf1}
