/* =====================================================================
   BİLSAN LOJİSTİK - Özel stiller (sarı-siyah kurumsal tema, gece modu, yazdırma)
   Tailwind sınıfları: kutuphaneler/tailwind.css (araclar/css_olustur.bat ile üretilir)
   ===================================================================== */
/* ===== TEMEL ===== */
html, body { margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: #F8FAFC; overflow: auto; }
/* Giriş yapılmadan ana uygulama kesinlikle görünmez */
body.app-locked #app { display: none !important; }
/* Minimum çalışma alanı (pencere min_size=(1150,720) ile birlikte) */
#app { display: flex; width: 100%; min-width: 1100px; min-height: 660px; height: 100vh; overflow: hidden; position: relative; }
#main-area { min-width: 0; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
input, textarea, select { border-radius: 6px; }
input::selection, textarea::selection { background-color: #2563eb; color: #ffffff; }
.tab-btn.active { background-color: #1F2937; color: #FBBF24; border-left: 4px solid #FBBF24; }
.tab-btn { border-left: 4px solid transparent; }
/* ===== MENÜ GRUPLARI (Adım 2A: açılır-kapanır) ===== */
.nav-grup-icerik { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.22s ease; }
.nav-grup-ic { overflow: hidden; min-height: 0; }
.nav-grup.kapali .nav-grup-icerik { grid-template-rows: 0fr; }
.nav-grup .grp-ok { transition: transform 0.22s ease; opacity: 0.7; }
.nav-grup.kapali .grp-ok { transform: rotate(-90deg); }
.nav-grup.aktif-grup .nav-grup-baslik { cursor: default; }
.nav-grup.aktif-grup .grp-ok { opacity: 0.25; }
.grp-ozet { display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0; }
.grp-ozet .grp-sayi { padding: 1px 6px; border-radius: 9999px; font-size: 10px; font-weight: 700; line-height: 1.4; }
.grp-ozet .grp-sayi.kirmizi { background: #DC2626; color: #FFFFFF; }
.grp-ozet .grp-sayi.sari { background: #FBBF24; color: #111827; }
.grp-ozet .grp-nokta { width: 8px; height: 8px; border-radius: 9999px; background: #EF4444; box-shadow: 0 0 0 2px #111827; }
#ana-menu::-webkit-scrollbar { width: 5px; }
#ana-menu::-webkit-scrollbar-track { background: transparent; }
#ana-menu::-webkit-scrollbar-thumb { background: #374151; }
@media (prefers-reduced-motion: reduce) { .nav-grup-icerik, .nav-grup .grp-ok { transition: none; } }
.drawer-transition { transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1); }

/* ===== TABLO BAŞLIKLARI (SIRALAMA OK HATASI DÜZELTMESİ) ===== */
.data-table thead th { white-space: nowrap; vertical-align: middle; height: 40px; }
.th-inner { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; line-height: 1; max-width: 100%; }
.th-inner .sort-ico { display: inline-flex; align-items: center; justify-content: center; width: 10px; flex: none; }
th.sortable { cursor: pointer; user-select: none; transition: background-color 0.15s; }
th.sortable:hover { background-color: #f1f5f9; color: #111827; }

/* ===== TABLO YOĞUNLUĞU ===== */
html.density-ferah .data-table tbody td { padding-top: 0.8rem !important; padding-bottom: 0.8rem !important; }
html.density-kompakt .data-table tbody td { padding-top: 0.2rem !important; padding-bottom: 0.2rem !important; }
html.density-kompakt .data-table thead th { height: 32px; padding-top: 0.35rem !important; padding-bottom: 0.35rem !important; }

/* ===== ROL ROZETLERİ ===== */
.role-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; line-height: 16px; }
.role-badge.lg { font-size: 11px; padding: 3px 11px; }
.role-badge.as-yon { font-weight: 900; }

/* ===== YETKİ ANAHTARI (TOGGLE) ===== */
.perm-toggle { position: relative; display: inline-block; width: 34px; height: 18px; flex: none; }
.perm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.perm-toggle span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .2s; cursor: pointer; }
.perm-toggle span:before { content: ''; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.perm-toggle input:checked + span { background: #F59E0B; }
.perm-toggle input:checked + span:before { transform: translateX(16px); }
.perm-toggle input:disabled + span { opacity: .45; cursor: not-allowed; }

/* ===== KARA LİSTE ÜNLEM BUTONU ===== */
.bl-alert-btn { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; border: 2px solid #dc2626; color: #dc2626; font-weight: 900; font-size: 11px; margin-left: 6px; line-height: 1; cursor: pointer; transition: all .15s; vertical-align: middle; background: #fff; }
.bl-alert-btn:hover { background: #dc2626; color: #fff; }

/* ===== CANLI KARA LİSTE UYARISI ===== */
@keyframes blIn { 0% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes blGlow { 0%,100% { box-shadow: 0 10px 25px -5px rgba(220,38,38,.45); } 50% { box-shadow: 0 10px 34px -2px rgba(220,38,38,.8); } }
.live-bl-card { animation: blIn .35s ease-out, blGlow 1.8s ease-in-out infinite; }

/* ===== SEGMENTLİ SEÇİCİ ===== */
.seg-btn { padding: 7px 14px; font-size: 12px; font-weight: 700; border-radius: 8px; color: #4b5563; transition: all .15s; }
.seg-btn:hover { color: #111827; }
.seg-btn.active { background: #111827; color: #FBBF24; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

/* ===== GİRİŞ / YÜKLEME ===== */
@keyframes bootBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.boot-bar { animation: bootBar 1.1s ease-in-out infinite; }
.fade-out { opacity: 0 !important; transition: opacity .35s ease; }

/* ===== TOAST ===== */
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast { animation: toastIn .25s ease-out; }

/* ===== FATURA KÂĞIDI (YAZDIRMA GÖRÜNÜMÜ - tema bağımsız) ===== */
.inv-paper { background: #ffffff; color: #111827; max-width: 820px; margin: 0 auto; padding: 28px 32px; border-radius: 10px; box-shadow: 0 4px 18px rgba(0,0,0,.12); font-size: 12px; }
.inv-paper * { color: inherit; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 4px solid #FBBF24; padding-bottom: 14px; margin-bottom: 16px; }
.inv-brand { font-weight: 900; font-size: 22px; letter-spacing: 1px; color: #09356a; }
.inv-brand small { display: block; font-size: 10px; letter-spacing: 4px; color: #5b646d; font-weight: 700; }
.inv-type { background: #111827; color: #FBBF24 !important; font-weight: 900; padding: 6px 14px; border-radius: 6px; font-size: 13px; letter-spacing: 1px; display: inline-block; }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.inv-box { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; }
.inv-box h5 { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #6b7280 !important; margin-bottom: 6px; letter-spacing: .05em; }
.inv-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.inv-row span:first-child { color: #6b7280 !important; }
.inv-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.inv-table th { background: #111827; color: #FBBF24 !important; font-size: 10px; text-transform: uppercase; padding: 7px 8px; text-align: left; }
.inv-table td { border-bottom: 1px solid #e5e7eb; padding: 7px 8px; }
.inv-table .r { text-align: right; }
.inv-totals { margin-left: auto; width: 320px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.inv-totals .inv-row { padding: 6px 12px; border-bottom: 1px solid #f1f5f9; }
.inv-totals .grand { background: #111827; color: #FBBF24 !important; font-weight: 900; font-size: 14px; }
.inv-totals .grand span { color: #FBBF24 !important; }
.inv-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.inv-stamp { margin-top: 18px; font-size: 10px; color: #9ca3af !important; text-align: center; border-top: 1px dashed #e5e7eb; padding-top: 10px; }
@media print {
    @page { size: A4; margin: 12mm; }
    html, body { zoom: 1 !important; background: #ffffff !important; overflow: visible !important; height: auto !important; min-width: 0 !important; }
    body > *:not(#print-root) { display: none !important; }
    #print-root { display: block !important; }
    #print-root .inv-paper { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
    #print-root .no-print { display: none !important; }
    .inv-table th, .inv-type, .inv-totals .grand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
#print-root { display: none; }

/* ===== GECE MODU (DARK MODE) ===== */
html.theme-dark body { background-color: #121417; color: #E5E7EB; }
html.theme-dark .bg-white { background-color: #1E2228 !important; }
html.theme-dark .bg-gray-50 { background-color: #23282F !important; }
html.theme-dark .bg-gray-100 { background-color: #2A3038 !important; }
html.theme-dark .bg-gray-200 { background-color: #333A44 !important; }
html.theme-dark .bg-light { background-color: #121417 !important; }
html.theme-dark .text-gray-900, html.theme-dark .text-gray-800 { color: #F3F4F6 !important; }
html.theme-dark .text-gray-700 { color: #D1D5DB !important; }
html.theme-dark .text-gray-600, html.theme-dark .text-gray-500 { color: #9CA3AF !important; }
html.theme-dark .text-gray-400 { color: #7B8494 !important; }
html.theme-dark .border-gray-100, html.theme-dark .border-gray-200, html.theme-dark .border-gray-300 { border-color: #343A44 !important; }
html.theme-dark :is(.border, .border-b, .border-t, .border-r, .border-l):not([class*="border-red"]):not([class*="border-amber"]):not([class*="border-emerald"]):not([class*="border-indigo"]):not([class*="border-bilsan"]):not([class*="border-gray-7"]):not([class*="border-gray-8"]):not([class*="border-dashed"]) { border-color: #343A44 !important; }
html.theme-dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #2D333C !important; }
html.theme-dark input, html.theme-dark textarea, html.theme-dark select { color: #F3F4F6; }
html.theme-dark input::placeholder, html.theme-dark textarea::placeholder { color: #6B7280; }
html.theme-dark .hover\:bg-gray-50:hover, html.theme-dark .hover\:bg-gray-100:hover, html.theme-dark .hover\:bg-gray-200:hover { background-color: #2F3640 !important; }
html.theme-dark .hover\:bg-amber-50\/50:hover { background-color: rgba(251,191,36,0.07) !important; }
html.theme-dark th.sortable:hover { background-color: #2A3038; color: #FBBF24; }
html.theme-dark .bg-amber-50 { background-color: rgba(245,158,11,0.10) !important; }
html.theme-dark .bg-emerald-50 { background-color: rgba(16,185,129,0.10) !important; }
html.theme-dark .bg-red-50 { background-color: rgba(239,68,68,0.10) !important; }
html.theme-dark .bg-indigo-50 { background-color: rgba(99,102,241,0.12) !important; }
html.theme-dark .text-emerald-800, html.theme-dark .text-emerald-900 { color: #6EE7B7 !important; }
html.theme-dark .text-red-900 { color: #FCA5A5 !important; }
html.theme-dark .seg-btn { color: #9CA3AF; }
html.theme-dark .seg-btn.active { background: #FBBF24; color: #111827; }
html.theme-dark .bl-alert-btn { background: #1E2228; }
html.theme-dark ::-webkit-scrollbar-track { background: #1a1d22; }
html.theme-dark ::-webkit-scrollbar-thumb { background: #3b424d; }
html.theme-dark .shadow-soft { box-shadow: 0 4px 10px -2px rgba(0,0,0,.35); }

/* Adım 5B: gece modunda saydam açık zeminler (genişletilen yük alt satırları, arama vurgusu, açık sefer satırı)
   koyu temaya uygun tonlara çevrilir; gündüz görünümü değişmez. */
html.theme-dark .bg-gray-50\/60, html.theme-dark .bg-gray-50\/80 { background-color: #23282F !important; }
html.theme-dark .bg-amber-50\/40 { background-color: rgba(251,191,36,0.07) !important; }
html.theme-dark .bg-yellow-100\/70 { background-color: rgba(250,204,21,0.13) !important; }
html.theme-dark .hover\:bg-amber-50\/60:hover { background-color: rgba(251,191,36,0.10) !important; }
html.theme-dark .bg-blue-50, html.theme-dark .bg-blue-50\/60, html.theme-dark .bg-sky-50 { background-color: rgba(59,130,246,0.12) !important; }
html.theme-dark .bg-orange-50, html.theme-dark .bg-yellow-50 { background-color: rgba(245,158,11,0.10) !important; }
html.theme-dark .bg-green-50 { background-color: rgba(16,185,129,0.10) !important; }
html.theme-dark .text-blue-800 { color: #93C5FD !important; }
html.theme-dark tr.sefer-acik { background-color: #262B31 !important; }
html.theme-dark tr.sefer-acik:hover { background-color: #2C323A !important; }
html.theme-dark tr.yuk-alt-satir { background-color: #191C21 !important; }
html.theme-dark tr.yuk-alt-satir:hover { background-color: #22272E !important; }
html.theme-dark tr.yuk-alt-satir > td:first-child { box-shadow: inset 3px 0 0 #4B5563; }
html.theme-dark tr.yuk-alt-satir.yuk-vurgu { background-color: rgba(250,204,21,0.12) !important; }
html.theme-dark tr.yuk-alt-satir.yuk-vurgu > td:first-child { box-shadow: inset 3px 0 0 #FACC15; }
html.theme-dark tr.yuk-alt-satir.yuk-vurgu:hover { background-color: rgba(250,204,21,0.18) !important; }

/* ===== Adım 6C: ortak öneri kutusu ===== */
.oneri-kutu { position: fixed; z-index: 200; max-height: 240px; overflow-y: auto; background: #ffffff; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 10px 25px -5px rgba(0,0,0,.18); padding: 3px; font-size: 12px; }
.oneri-oge { padding: 6px 9px; border-radius: 5px; cursor: pointer; color: #111827; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oneri-oge:hover { background: #f3f4f6; }
.oneri-oge.aktif { background: #FBBF24; color: #111827; }
.oneri-ek { font-weight: 600; color: #6b7280; font-size: 11px; margin-left: 4px; }
.oneri-oge.aktif .oneri-ek { color: #374151; }
html.theme-dark .oneri-kutu { background: #1E2228; border-color: #3b424d; box-shadow: 0 10px 25px -5px rgba(0,0,0,.6); }
html.theme-dark .oneri-oge { color: #F3F4F6; }
html.theme-dark .oneri-oge:hover { background: #2F3640; }
html.theme-dark .oneri-oge.aktif { background: #FBBF24; color: #111827; }
html.theme-dark .oneri-ek { color: #9CA3AF; }
html.theme-dark .oneri-oge.aktif .oneri-ek { color: #374151; }

/* ===== Adım 6B: TC alanı ===== */
.tc-yok-kutu { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: #6b7280; cursor: pointer; user-select: none; }
.tc-yok-kutu input { width: 12px; height: 12px; accent-color: #EAB308; cursor: pointer; }
input.tc-kilitli, input.tc-kilitli:disabled { background-color: #e5e7eb !important; color: #9ca3af !important; cursor: not-allowed; }
.tc-rozet { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.kayitli-rozet { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: #065f46; background: #d1fae5; border: 1px solid #6ee7b7; border-radius: 999px; padding: 1px 8px; }
.tc-geri-al { font-size: 10px; font-weight: 800; color: #b45309; text-decoration: underline; }
.tc-yok-rozet { display: inline-block; font-size: 9px; font-weight: 800; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 4px; padding: 0 5px; }
html.theme-dark .tc-yok-kutu { color: #9CA3AF; }
html.theme-dark input.tc-kilitli, html.theme-dark input.tc-kilitli:disabled { background-color: #2A3038 !important; color: #6B7280 !important; }
html.theme-dark .kayitli-rozet { color: #6EE7B7; background: rgba(16,185,129,.12); border-color: rgba(110,231,183,.35); }
html.theme-dark .tc-geri-al { color: #FBBF24; }
html.theme-dark .tc-yok-rozet { color: #FCD34D; background: rgba(245,158,11,.12); border-color: rgba(252,211,77,.35); }

/* ===== Adım 6B: gece modunda açılır listeler (select) ===== */
html.theme-dark { color-scheme: dark; }
html.theme-dark select option, html.theme-dark select optgroup { background-color: #1E2228; color: #F3F4F6; }
html.theme-dark select:not([class*="bg-"]) { background-color: #23282F; }
html.theme-dark .bg-amber-50 option { background-color: #1E2228; }

/* ===== Adım 7A: sefer türü seçimi ===== */
.sefer-tur-secenek { display: flex; align-items: flex-start; gap: 6px; padding: 6px 8px; border: 1.5px solid #e5e7eb; border-radius: 8px; cursor: pointer; background: #f9fafb; transition: border-color .15s, background-color .15s; }
.sefer-tur-secenek input { margin-top: 2px; accent-color: #EAB308; cursor: pointer; }
.sefer-tur-secenek b { display: block; font-size: 11px; color: #111827; }
.sefer-tur-secenek small { display: block; font-size: 9.5px; line-height: 1.25; color: #6b7280; font-weight: 600; }
.sefer-tur-secenek:hover { border-color: #FBBF24; }
.sefer-tur-secenek.secili { border-color: #EAB308; background: #FFFBEB; box-shadow: 0 0 0 1px #EAB308 inset; }
.tur-eksik .sefer-tur-secenek { border-style: dashed; }
.tur-rozet { display: inline-flex; align-items: center; gap: 3px; font-size: 8.5px; font-weight: 900; letter-spacing: .03em; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.tur-rozet.aracilik { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.tur-rozet.kendi { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.mali-ikon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; font-size: 9px; }
html.theme-dark .sefer-tur-secenek { background: #23282F; border-color: #343A44; }
html.theme-dark .sefer-tur-secenek b { color: #F3F4F6; }
html.theme-dark .sefer-tur-secenek small { color: #9CA3AF; }
html.theme-dark .sefer-tur-secenek.secili { background: rgba(234,179,8,.12); border-color: #EAB308; }
html.theme-dark .tur-rozet.aracilik { background: #2A3038; color: #CBD5E1; border-color: #475569; }
html.theme-dark .tur-rozet.kendi { background: rgba(245,158,11,.15); color: #FCD34D; border-color: rgba(252,211,77,.4); }

/* ===== Adım 8: operasyon durumu rozetleri (gece modu) ===== */
html.theme-dark .op-rozet.bg-indigo-100 { background: rgba(99,102,241,.18) !important; color: #A5B4FC !important; }
html.theme-dark .op-rozet.bg-amber-100 { background: rgba(245,158,11,.16) !important; color: #FCD34D !important; }
html.theme-dark .op-rozet.bg-emerald-100 { background: rgba(16,185,129,.16) !important; color: #6EE7B7 !important; }
html.theme-dark .op-rozet.bg-sky-100 { background: rgba(14,165,233,.16) !important; color: #7DD3FC !important; }
html.theme-dark .op-secici { background: #23282F !important; color: #F3F4F6; border-color: #3b424d; }
/* Adım 10: Raporlar sekmesi */
.rp-tur-btn, .rp-hizli-btn { padding: 6px 11px; font-size: 12px; font-weight: 700; border-radius: 8px; color: #4b5563; background: #f3f4f6; border: 1px solid #e5e7eb; transition: all .15s; white-space: nowrap; }
.rp-hizli-btn { padding: 5px 9px; font-size: 11px; }
.rp-tur-btn:hover, .rp-hizli-btn:hover { color: #111827; border-color: #d1d5db; }
.rp-tur-btn.secili, .rp-hizli-btn.secili { background: #111827; color: #FBBF24; border-color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.rp-tablo thead tr { box-shadow: inset 0 -1px 0 #e5e7eb; }
.rp-toplam td { background: #FEF3C7; color: #111827; border-top: 2px solid #FBBF24; }
html.theme-dark .rp-tur-btn, html.theme-dark .rp-hizli-btn { background: #23282F; color: #9CA3AF; border-color: #343A44; }
html.theme-dark .rp-tur-btn:hover, html.theme-dark .rp-hizli-btn:hover { color: #F3F4F6; border-color: #4B5563; }
html.theme-dark .rp-tur-btn.secili, html.theme-dark .rp-hizli-btn.secili { background: #FBBF24; color: #111827; border-color: #FBBF24; }
html.theme-dark .rp-tablo thead tr { box-shadow: inset 0 -1px 0 #343A44; }
html.theme-dark .rp-toplam td { background: #2A2618; color: #FCD34D; border-top-color: #B45309; }
html.theme-dark .rp-tablo .text-rose-600 { color: #FB7185 !important; }
/* Adım 10: Raporlar eklenince menü 1536x816 ekrana sığsın diye düğmeler biraz sıkılaştırıldı */
#ana-menu .tab-btn { padding-top: 5px; padding-bottom: 5px; }

/* =====================================================================
   Adım 11: Telefon görünümü (html.mobil, ~768 px altı) - js/mobil.js
   ===================================================================== */
.mobil-only { display: none !important; }
html.mobil .mobil-only { display: flex !important; }
html.mobil .masaustu-only { display: none !important; }
html.mobil body { zoom: 1 !important; }
html.mobil #app { min-width: 0; min-height: 0; }
/* Sol menü: kayan çekmece */
html.mobil #yan-menu { position: fixed; top: 0; bottom: 0; left: 0; width: 82vw; max-width: 300px; z-index: 70; transform: translateX(-105%); transition: transform .22s ease; }
html.mobil.menu-acik #yan-menu { transform: none; }
#mobil-menu-zemin { display: none; }
html.mobil.menu-acik #mobil-menu-zemin { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 65; }
html.mobil #ana-menu .tab-btn { padding-top: 11px; padding-bottom: 11px; font-size: 15px; }
html.mobil #sidebar-logo-container { cursor: default; }
/* Üst çubuk ve içerik */
html.mobil #main-area > header { padding-left: 10px; padding-right: 10px; height: 52px; gap: 6px; }
html.mobil #page-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.mobil #hdr-today { display: none; }
.mobil-ust-btn { width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; font-size: 17px; color: #374151; background: #f3f4f6; flex-shrink: 0; }
html.mobil #main-area > div.flex-1 { padding: 8px; }
html.mobil [id^="view-"] { gap: 8px; }
/* Taşmayı önle: sabit en küçük genişlikler kalkar, araç çubukları alt satıra iner, ızgaralar tek sütun olur */
html.mobil #main-area [class*="min-w-["], html.mobil [id$="-modal"] [class*="min-w-["] { min-width: 0 !important; }
html.mobil #main-area [class*="w-[2"], html.mobil #main-area [class*="w-[3"], html.mobil #main-area [class*="w-[4"] { max-width: 100%; }
html.mobil [id^="view-"] > div.flex:not(.flex-col), html.mobil [id^="view-"] > div > div.flex:not(.flex-col) { flex-wrap: wrap; }
html.mobil #main-area [class*="grid-cols-"]:not(.mobil-izgara), html.mobil [id$="-modal"] [class*="grid-cols-"]:not(.mobil-izgara) { grid-template-columns: minmax(0, 1fr) !important; }
html.mobil #main-area [class*="col-span-"], html.mobil [id$="-modal"] [class*="col-span-"] { grid-column: auto !important; }
html.mobil #main-area input[type="text"], html.mobil #main-area input:not([type]), html.mobil #main-area select { font-size: 16px; min-height: 40px; max-width: 100%; }
html.mobil #main-area .w-36, html.mobil #main-area .w-40, html.mobil #main-area .w-44, html.mobil #main-area .w-48, html.mobil #main-area .w-56, html.mobil #main-area .w-64 { width: 100%; }
html.mobil #main-area button { min-height: 36px; }
/* Telefonda olmayan işlemler */
html.mobil #btn-det-duzenle, html.mobil #bulk-actions-bar, html.mobil #btn-bulk-delete, html.mobil #rp-excel,
html.mobil [onclick*="exportModule"], html.mobil [onclick*="runBackupTask"], html.mobil [onclick*="delete" i], html.mobil [onclick*="Sil(" ],
html.mobil [onclick*="sil(" ], html.mobil #main-area button:has(> i.fa-trash), html.mobil #main-area button:has(> i.fa-trash-can),
html.mobil [onclick*="editRecord"], html.mobil #lbl-time-liste, html.mobil .row-checkbox, html.mobil #chk-select-all { display: none !important; }
/* Sefer listesi: tablo yerine kartlar */
html.mobil #liste-tablo-kap { display: none !important; }
#mobil-sefer-kartlari { flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1 1 0%; padding-bottom: 16px; }
.mobil-kart { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 12px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.mobil-kart:active { background: #f9fafb; }
.mobil-kart b { color: #111827; }
.mobil-tel { width: 44px; height: 44px; border-radius: 50%; background: #10B981; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; text-decoration: none; }
td .mobil-tel { width: 34px; height: 34px; font-size: 14px; margin-left: 6px; vertical-align: middle; }
.mobil-mali .flex-col { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.mobil-daha { width: 100%; padding: 14px; border-radius: 12px; background: #111827; color: #FBBF24; font-weight: 800; font-size: 14px; }
/* Diğer tablolar: kart listesi */
html.mobil #main-area table:not(.mobil-tablo-koru) { display: block; min-width: 0 !important; width: 100% !important; table-layout: auto !important; }
html.mobil #main-area table:not(.mobil-tablo-koru) thead { display: none; }
html.mobil #main-area table:not(.mobil-tablo-koru) tbody, html.mobil #main-area table:not(.mobil-tablo-koru) tfoot { display: block; }
html.mobil #main-area table:not(.mobil-tablo-koru) tr { display: block; background: #fff; border: 1px solid #e5e7eb !important; border-radius: 12px; margin: 0 0 8px; padding: 6px 10px; }
html.mobil #main-area table:not(.mobil-tablo-koru) td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0 !important; border: 0 !important; text-align: right !important; white-space: normal !important; min-height: 26px; width: auto !important; max-width: none !important; overflow-wrap: anywhere; }
html.mobil #main-area table:not(.mobil-tablo-koru) td::before { content: attr(data-label); font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; text-align: left; flex-shrink: 0; max-width: 45%; }
html.mobil #main-area table:not(.mobil-tablo-koru) td[data-label=""]::before { content: none; }
html.mobil #main-area table:not(.mobil-tablo-koru) td[data-label=""] { justify-content: flex-end; }
html.mobil #main-area table:not(.mobil-tablo-koru) td:first-child { font-size: 14px; font-weight: 800; }
html.mobil #main-area table:not(.mobil-tablo-koru) td > * { max-width: 100%; }
html.mobil #main-area .overflow-auto, html.mobil #main-area .overflow-x-auto { overflow-x: hidden !important; }
html.mobil .rp-toplam td { background: #FEF3C7; }
/* Pencereler tam ekran */
html.mobil div[id$="-modal"].fixed { padding: 0 !important; align-items: stretch !important; }
html.mobil div[id$="-modal"].fixed > div { max-width: 100% !important; width: 100% !important; max-height: 100% !important; height: 100%; border-radius: 0 !important; }
html.mobil #confirm-modal.fixed { padding: 16px !important; align-items: center !important; }
html.mobil #confirm-modal.fixed > div { height: auto; border-radius: 16px !important; }
html.mobil div[id$="-modal"] .px-6 { padding-left: 14px; padding-right: 14px; }
html.mobil div[id$="-modal"] .p-6 { padding: 12px; }
html.mobil div[id$="-modal"] input[type="text"], html.mobil div[id$="-modal"] input:not([type]), html.mobil div[id$="-modal"] select, html.mobil div[id$="-modal"] textarea { font-size: 16px; }
html.mobil #detail-modal .border-t.shrink-0 { flex-wrap: wrap; }
html.mobil #detail-modal .border-t.shrink-0 > button { flex: 1 1 45%; padding-top: 12px; padding-bottom: 12px; font-size: 13px; }
html.mobil #det-yukler select, html.mobil #det-yukler button { min-height: 38px; font-size: 14px; }
html.mobil #det-yukler [class*="grid-cols-"] { grid-template-columns: minmax(0, 1fr) !important; }
/* Gece modu */
html.theme-dark .mobil-ust-btn { background: #23282F; color: #D1D5DB; }
html.theme-dark .mobil-kart { background: #1E2228; border-color: #343A44; box-shadow: none; }
html.theme-dark .mobil-kart:active { background: #23282F; }
html.theme-dark .mobil-kart b { color: #F3F4F6; }
html.theme-dark.mobil #main-area table:not(.mobil-tablo-koru) tr { background: #1E2228; border-color: #343A44 !important; }
html.theme-dark.mobil #main-area table:not(.mobil-tablo-koru) td::before { color: #9CA3AF; }
html.theme-dark .mobil-daha { background: #FBBF24; color: #111827; }
html.theme-dark.mobil .rp-toplam td { background: #2A2618; }
/* Adım 11: sefer listesi araç çubuğu (telefon) */
html.mobil #view-liste > div:first-child { gap: 8px; }
html.mobil #view-liste > div:first-child > div:first-child { flex: 1 1 100%; flex-wrap: wrap; gap: 8px; }
html.mobil #view-liste > div:first-child > div:first-child > div.relative { max-width: none; flex: 1 1 100%; }
html.mobil #view-liste > div:first-child > div:first-child > div.flex-col { flex: 1 1 auto; }
html.mobil #btn-filtreler { min-height: 40px; padding-left: 14px; padding-right: 14px; }
html.mobil #liste-filtreler > div > * { flex: 1 1 100%; }
/* Adım 11: liste dışındaki sekmeler telefonda bütün olarak kayar (iç kaydırma alanları açılır) */
html.mobil [id^="view-"]:not(#view-liste) { overflow-y: auto !important; overflow-x: hidden !important; }
html.mobil [id^="view-"]:not(#view-liste) > *, html.mobil [id^="view-"]:not(#view-liste) .flex-1 { flex: none !important; min-height: auto !important; }
html.mobil [id^="view-"]:not(#view-liste) .overflow-auto, html.mobil [id^="view-"]:not(#view-liste) .overflow-y-auto, html.mobil [id^="view-"]:not(#view-liste) .overflow-hidden { overflow: visible !important; max-height: none !important; }
html.mobil [id^="view-"]:not(#view-liste) .h-full { height: auto !important; }
html.mobil [id^="view-"]:not(#view-liste) thead.sticky, html.mobil [id^="view-"]:not(#view-liste) tfoot.sticky { position: static; }
html.mobil #main-area .relative:has(> input) { flex: 1 1 100%; max-width: none; }
html.mobil #main-area .relative > input { width: 100% !important; }
html.mobil #rp-grafik-kap { flex-direction: column; height: 240px !important; }
html.mobil #rp-grafik-kap > div:first-child { width: auto; flex-direction: row; gap: 10px; align-items: center; }
html.mobil #rp-lejant { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
html.mobil #rp-grafik-kap > div:last-child { flex: 1 1 0% !important; min-height: 0 !important; }
html.mobil #rp-hizli { flex-wrap: wrap; }
html.mobil [id^="view-"]:not(#view-liste) .flex-1, html.mobil [id^="view-"]:not(#view-liste) > * { max-width: 100%; }
html.mobil .mobil-hucre { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; min-width: 0; text-align: right; }
html.mobil .mobil-hucre > * { min-width: 0; max-width: 100%; }
html.mobil #main-area table:not(.mobil-tablo-koru) td * { white-space: normal; }
html.mobil #main-area table:not(.mobil-tablo-koru) td .truncate { white-space: nowrap; }
html.mobil #main-area table:not(.mobil-tablo-koru) td [class*="w-["], html.mobil #main-area table:not(.mobil-tablo-koru) td [class*="max-w-"] { width: auto !important; max-width: 100% !important; }
html.mobil #fy-motorin { white-space: normal; flex-wrap: wrap; row-gap: 4px; }

/* Adım 13I: şoför penceresinde seçili bölge / il çipleri - tıklayınca kaldırılır, üzerine gelince × */
.sm-cip { cursor: pointer; transition: filter .15s, opacity .15s; }
.sm-cip .cip-x { width: 0; opacity: 0; overflow: hidden; transition: width .15s, opacity .15s; font-size: 9px; }
.sm-cip:hover .cip-x, .sm-cip:focus-visible .cip-x { width: 10px; opacity: 1; }
.sm-cip:hover { filter: brightness(.92); text-decoration: line-through; text-decoration-thickness: 1px; }
html.mobil .sm-cip .cip-x { width: 10px; opacity: .7; }   /* telefonda üzerine gelme yok: × hep görünür */
/* Adım 13C: yük alt satırlarında mali durum */
.yuk-mali span { font-size: 9px !important; padding: 1px 6px !important; }
html.theme-dark .yuk-kalan { color: #FDBA74; }
html.theme-dark .tedarikci-rozet { background: rgba(139,92,246,.18) !important; color: #C4B5FD !important; }
html.theme-dark .yk-kom-kutu { background: rgba(245,158,11,.06) !important; border-color: rgba(245,158,11,.30) !important; }
html.theme-dark .cr-toplam-satir { background: #111827 !important; border-color: #374151 !important; }
html.theme-dark .cr-toplam-satir td { color: #F3F4F6; }
.mali-lejant { letter-spacing: 0; }

/* Adım 13G: Türkiye haritası */
.harita-mini { position: absolute; right: 8px; top: 50%; transform: translateY(-75%); width: 66px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 3px 2px; border-radius: 8px; color: #9CA3AF; transition: background-color .15s, color .15s, transform .15s; }
.harita-mini:hover { background: rgba(251,191,36,.12); color: #FBBF24; transform: translateY(-75%) scale(1.06); }
.harita-mini-svg { width: 58px; height: 31px; fill: currentColor; }
.harita-mini-yazi { font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.harita-panel { position: absolute; left: 252px; top: 10px; width: min(900px, calc(100vw - 268px)); max-height: calc(100vh - 20px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 25px 60px rgba(0,0,0,.35); border: 1px solid #E5E7EB; overflow: hidden;
  transform: scale(.08); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease; }
.harita-panel.acik { transform: scale(1); opacity: 1; }
.harita-govde { display: flex; gap: 12px; padding: 10px 14px; min-height: 0; }
.harita-kap { position: relative; flex: 1; min-width: 0; }
#harita-svg { width: 100%; height: auto; display: block; }
.harita-il { fill: #E5E7EB; stroke: #fff; stroke-width: .8; cursor: pointer; transition: fill .12s; }
.harita-il:hover { fill: #FCD34D; }
.harita-il.cikis { fill: #10B981; }
.harita-il.varis { fill: #3B82F6; }
.harita-cizgi { stroke: #111827; stroke-width: 2.5; stroke-dasharray: 7 5; stroke-linecap: round; pointer-events: none; }
.harita-nokta { stroke: #fff; stroke-width: 2; pointer-events: none; }
.harita-nokta.cikis { fill: #047857; } .harita-nokta.varis { fill: #1D4ED8; }
.harita-etiket { display: none; position: absolute; pointer-events: none; background: #111827; color: #FBBF24; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; white-space: nowrap; z-index: 2; }
.harita-sonuc { width: 270px; flex-shrink: 0; max-height: calc(100vh - 160px); overflow-y: auto; }
.harita-deger { background: #F9FAFB; border: 1px solid #F3F4F6; border-radius: 10px; padding: 7px 9px; min-width: 0; }
.harita-renk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.harita-renk.cikis { background: #10B981; } .harita-renk.varis { background: #3B82F6; }
html.theme-dark .harita-panel { background: #1F2328; border-color: #374151; }
html.theme-dark .harita-il { fill: #374151; stroke: #1F2328; }
html.theme-dark .harita-il:hover { fill: #B45309; }
html.theme-dark .harita-il.cikis { fill: #059669; } html.theme-dark .harita-il.varis { fill: #2563EB; }
html.theme-dark .harita-cizgi { stroke: #FBBF24; }
html.theme-dark .harita-deger { background: #161A1E; border-color: #2D333B; }
html.theme-dark .harita-deger .text-gray-900 { color: #F3F4F6 !important; }
html.mobil .harita-panel { left: 6px; right: 6px; top: 58px; width: auto; max-height: calc(100vh - 70px); overflow-y: auto; }
html.mobil .harita-govde { flex-direction: column; padding: 8px; }
html.mobil .harita-sonuc { width: auto; }
html.mobil #harita-secim { order: 3; flex-basis: 100%; flex-wrap: nowrap; }
html.mobil #harita-cikis, html.mobil #harita-varis { width: 0; flex: 1 1 0; min-width: 0; }

/* Adım 14A: şoför içe aktarma */
.sa-ilerleme-cubuk { width: 35%; animation: sa-ilerle 1.1s ease-in-out infinite; }
@keyframes sa-ilerle { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
html.theme-dark tr.sa-kara { background: rgba(220,38,38,.12) !important; }
html.theme-dark #sa-ilerleme { background: rgba(245,158,11,.10) !important; border-color: rgba(245,158,11,.35) !important; }

/* Adım 14B: geçiş ücretleri */
html.theme-dark .gc-eski { background: rgba(245,158,11,.10) !important; border-color: rgba(245,158,11,.35) !important; color: #FCD34D !important; }
