/* Hakediş — ortak görünüm (Bootstrap 5 üzerine) */
:root {
    --yan-gen: 248px;
    --yan-zemin: #0f172a;
    --yan-yazi: #cbd5e1;
    --ana-zemin: #f1f5f9;
    --kart-zemin: #ffffff;
    --kenar: #e2e8f0;
    --soluk: #64748b;
    --vurgu: #2563eb;
    --yesil: #16a34a;
    --turuncu: #d97706;
    --kirmizi: #dc2626;
    --golge: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --bs-body-bg: var(--ana-zemin);
}
html, body { height: 100%; }
body { background: var(--ana-zemin); color: #0f172a; font-size: .925rem; -webkit-tap-highlight-color: transparent; }
.text-soluk { color: var(--soluk) !important; }
.fw-600 { font-weight: 600; }
.tabular, .tutar { font-variant-numeric: tabular-nums; }
.tutar { white-space: nowrap; }

/* ------------------------------------------------------------------ yerleşim */
.yerlesim { display: flex; min-height: 100vh; }
.yan, .yan.offcanvas-lg {
    width: var(--yan-gen); flex: 0 0 var(--yan-gen); background: var(--yan-zemin) !important; color: var(--yan-yazi);
    display: flex; flex-direction: column;
}
@media (min-width: 992px) {
    .yan { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
@media (max-width: 991.98px) {
    .yan.offcanvas-lg { --bs-offcanvas-width: 270px; background: var(--yan-zemin); color: var(--yan-yazi);
        height: 100dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }   /* uzun menü kendi içinde kayar */
    .yan.offcanvas-lg .yan-menu { flex: 0 0 auto; }
    .yan.offcanvas-lg .yan-alt { margin-top: auto; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); }
}
.yan-ust { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1rem .75rem; }
.marka { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.marka-logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #6366f1); display: grid; place-items: center; font-weight: 800; }
.yan-menu { padding: .25rem .6rem; flex: 1; }
.yan-grup { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; margin: 1rem .6rem .35rem; font-weight: 700; }
.yan-oge {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 9px; color: var(--yan-yazi);
    text-decoration: none; font-weight: 500; margin-bottom: 2px; position: relative;
}
.yan-oge i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.yan-oge:hover { background: rgba(148, 163, 184, .12); color: #fff; }
.yan-oge.aktif { background: rgba(59, 130, 246, .18); color: #fff; }
.yan-oge.aktif::before { content: ""; position: absolute; left: -.6rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--oge-renk, #3b82f6); }
.yan-oge[style*="--oge-renk"] i { color: var(--oge-renk); opacity: 1; }
.yan-alt { padding: .9rem 1rem 1.1rem; border-top: 1px solid rgba(148, 163, 184, .15); }
.kur-kutu { display: flex; align-items: center; gap: .4rem; color: #e2e8f0; }
.kur-kutu .kur-deger small { color: #94a3b8; }

.ana { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ust {
    position: sticky; top: 0; z-index: 1020; background: rgba(241, 245, 249, .92); backdrop-filter: blur(8px);
    display: flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem; border-bottom: 1px solid var(--kenar);
}
.ust-baslik { font-size: 1.15rem; font-weight: 700; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ust-sag { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.icerik { padding: 1.25rem 1.5rem 3rem; }
@media (max-width: 575.98px) {
    .ust { padding: .6rem .75rem; }
    .icerik { padding: .9rem .75rem 5rem; }
    .ust-sag .btn .metin { display: none; }
}
.btn-ikon { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; padding: .2rem .4rem; }

/* ------------------------------------------------------------------ kartlar */
.kart { background: var(--kart-zemin); border: 1px solid var(--kenar); border-radius: 14px; box-shadow: var(--golge); }
.kart-baslik { padding: .85rem 1.1rem; border-bottom: 1px solid var(--kenar); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 600; }
.kart-govde { padding: 1rem 1.1rem; }
.ozet-kart { padding: 1rem 1.1rem; height: 100%; }
.ozet-kart .etiket { color: var(--soluk); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ozet-kart .deger { font-size: 1.45rem; font-weight: 700; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.ozet-kart .alt { color: var(--soluk); font-size: .82rem; }
.ozet-ikon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 40px; }
.ozet-kart > div { min-width: 0; }
@media (max-width: 575.98px) {
    .ozet-kart { padding: .75rem .8rem; }
    .ozet-kart .ozet-ikon { width: 30px; height: 30px; flex-basis: 30px; font-size: .95rem; border-radius: 9px; }
    .ozet-kart.d-flex { flex-direction: column; gap: .45rem !important; }
    .ozet-kart .deger { font-size: clamp(.98rem, 4.6vw, 1.3rem); white-space: nowrap; }
    .ozet-kart .etiket { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ------------------------------------------------------------------ araç çubuğu / filtre */
.arac-cubugu { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.arac-cubugu .form-control, .arac-cubugu .form-select { width: auto; min-width: 0; }
.arac-cubugu .arama { flex: 1 1 220px; max-width: 360px; }
@media (max-width: 575.98px) {
    .arac-cubugu .arama { max-width: none; flex-basis: 100%; }
    .arac-cubugu .form-select { flex: 1 1 45%; }
}
.btn-group-segment .btn { white-space: nowrap; }

/* ------------------------------------------------------------------ tablolar: telefonda kart görünümü */
.tablo { width: 100%; border-collapse: separate; border-spacing: 0; }
.tablo th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--soluk); font-weight: 700; background: #f8fafc;
    padding: .6rem .75rem; border-bottom: 1px solid var(--kenar); white-space: nowrap; position: sticky; top: 0; }
.tablo td { padding: .6rem .75rem; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.tablo tbody tr:hover td { background: #f8fafc; }
.tablo tr.tiklanir { cursor: pointer; }
.tablo .sag { text-align: right; }
@media (max-width: 767.98px) {
    .tablo.kartlasan thead { display: none; }
    .tablo.kartlasan, .tablo.kartlasan tbody, .tablo.kartlasan tr, .tablo.kartlasan td { display: block; width: 100%; }
    .tablo.kartlasan tr { border: 1px solid var(--kenar); border-radius: 12px; margin-bottom: .6rem; background: #fff; padding: .35rem .2rem; }
    .tablo.kartlasan td { border: 0; padding: .3rem .75rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .tablo.kartlasan td::before { content: attr(data-etiket); color: var(--soluk); font-size: .78rem; font-weight: 600; text-align: left; flex: 0 0 auto; }
    .tablo.kartlasan td[data-etiket=""]::before { display: none; }
    .tablo.kartlasan td.kart-bas { font-weight: 700; justify-content: flex-start; text-align: left; font-size: 1rem; }
    .tablo.kartlasan td.kart-bas::before { display: none; }
    .tablo.kartlasan tbody tr:hover td { background: transparent; }
    /* liste ya da birden çok blok içeren hücre: etiket üstte, içerik tam genişlikte (yan yana sıkışıp kelime kelime kırılmasın) */
    .tablo.kartlasan td:has(> ol, > ul, > div + div, > div + ol, > ol + div) { display: block; text-align: left; }
    .tablo.kartlasan td:has(> ol, > ul, > div + div, > div + ol, > ol + div)::before { display: block; margin-bottom: .25rem; }
    .tablo.kartlasan td[data-etiket=""]:has(> ol, > ul, > div + div)::before { display: none; }
    .tablo.kartlasan td .kalem-liste { padding-left: 1.5rem; }
    .tablo.kartlasan td .kalem-liste + div { margin-top: .35rem; }
}

/* ------------------------------------------------------------------ rozetler */
.rozet { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.rozet-odendi { background: #dcfce7; color: #166534; }
.rozet-bekliyor { background: #fef3c7; color: #92400e; }
.rozet-kismi { background: #dbeafe; color: #1e40af; }
.rozet-iade { background: #f1f5f9; color: #475569; }
.rozet-faturasiz { background: #fee2e2; color: #991b1b; }
.firma-nokta { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* ------------------------------------------------------------------ iş listesi (fatura grupları) */
.grup { margin-bottom: 1rem; overflow: hidden; }
.grup-baslik { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; cursor: pointer; user-select: none; }
.grup-baslik .ok { transition: transform .15s; color: var(--soluk); }
.grup.kapali .grup-baslik .ok { transform: rotate(-90deg); }
.grup.kapali .grup-govde { display: none; }
.grup-baslik .toplamlar { margin-left: auto; text-align: right; }
.grup-bekleyen { border-color: #fcd34d; }
.grup-bekleyen .grup-baslik { background: #fffbeb; }
.is-satir td:first-child { width: 2.2rem; }
.is-satir .is-kod { font-weight: 600; }
.kalem-liste { margin: 0; padding-left: 1.7rem; font-size: .84rem; line-height: 1.4; color: #334155; }
.kalem-liste li { padding: .06rem 0; }
.kalem-liste li + li { border-top: 1px dashed #eef2f7; }
.kalem-liste li::marker { color: #dc2626; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-satir .is-ozet { font-size: .78rem; color: var(--soluk); }
.is-satir .is-not { max-width: 46rem; }
/* fatura önizleme */
.onizle-ust { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-bottom: 1rem; border-bottom: 2px solid var(--kenar); margin-bottom: 1rem; }
.onizle-ust h3 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.onizle-bilgi { display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; font-size: .9rem; }
.onizle-bilgi span:nth-child(odd) { color: var(--soluk); }
.onizle-tutar { min-width: 16rem; font-size: .92rem; }
.onizle-tutar div { display: flex; justify-content: space-between; gap: 1.5rem; padding: .12rem 0; }
.onizle-tutar .toplam { border-top: 1px solid var(--kenar); margin-top: .25rem; padding-top: .35rem; font-weight: 700; font-size: 1.05rem; }
.onizle-is { border: 1px solid var(--kenar); border-radius: 12px; margin-bottom: .9rem; overflow: hidden; }
.onizle-is-bas { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .6rem .9rem; background: #f8fafc; border-bottom: 1px solid var(--kenar); }
.onizle-is-bas .no { font-weight: 700; color: #dc2626; }
.onizle-is-bas .kod { font-weight: 700; }
.onizle-is-bas .tutar-sag { margin-left: auto; font-weight: 700; }
.onizle-is table { margin: 0; font-size: .87rem; }
.onizle-is th { font-size: .75rem; color: var(--soluk); font-weight: 600; text-transform: uppercase; background: #fff; }
.onizle-is td.sira { color: #dc2626; font-weight: 700; width: 2.2rem; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .onizle-tutar { min-width: 0; width: 100%; } .onizle-is .gizle-xs { display: none; } }
.is-alt td { background: #fbfdff; font-size: .85rem; }
.is-meta { display: none; }
@media (max-width: 767.98px) {
    /* iş satırı telefonda: [seç] kod / tarih · il ............ tutar ; altında yapılan işler */
    .is-tablo thead { display: none; }
    .is-tablo, .is-tablo tbody { display: block; }
    .is-tablo tr.is-satir { display: grid; grid-template-columns: auto 1fr auto; column-gap: .6rem; row-gap: .15rem; padding: .65rem .8rem;
        border-bottom: 1px solid #eef2f7; }
    .is-tablo tr.is-satir td { display: block; padding: 0; border: 0; text-align: left; }
    .is-tablo td.c-sec { grid-column: 1; grid-row: 1 / span 2; padding-top: .15rem; }
    .is-tablo td.c-sec:empty { display: none; }
    .is-tablo td.c-kod { grid-column: 2; grid-row: 1; min-width: 0; }
    .is-tablo td.c-tutar { grid-column: 3; grid-row: 1 / span 2; text-align: right; }
    .is-tablo tr.is-satir td.c-tarih, .is-tablo tr.is-satir td.c-il { display: none; }
    /* düzenle: satıra dokununca açılır; Drive dosyaları düğmesi telefonda da görünür (tutarın altında) */
    .is-tablo td.c-duz { grid-column: 3; grid-row: 2; text-align: right; }
    .is-tablo td.c-duz .is-duzenle { display: none; }
    .is-meta { display: block; color: var(--soluk); font-size: .8rem; }
}
@media (max-width: 767.98px) {
    .grup-baslik .toplamlar { margin-left: 0; width: 100%; text-align: left; }
}

/* seçim çubuğu (fatura kes) */
.secim-cubugu {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(150%); z-index: 1040;
    background: #0f172a; color: #fff; border-radius: 14px; padding: .65rem .75rem .65rem 1.1rem; display: flex; gap: .9rem; align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .35); transition: transform .2s; max-width: calc(100vw - 1.5rem); flex-wrap: wrap;
}
.secim-cubugu.acik { transform: translateX(-50%) translateY(0); }
@media (min-width: 992px) { .secim-cubugu { left: calc(50% + var(--yan-gen) / 2); } }

/* ------------------------------------------------------------------ formlar */
.form-label { font-size: .8rem; font-weight: 600; color: #334155; margin-bottom: .25rem; }
.form-control, .form-select { border-radius: 9px; border-color: #d5dde8; }
.form-control:focus, .form-select:focus { border-color: #93b4f5; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12); }
.satir-tablo td { padding: .3rem; vertical-align: top; }
.satir-tablo .form-control, .satir-tablo .form-select { font-size: .87rem; }
/* satır numarası (1. 2. 3.): silinince / eklenince kendiliğinden yeniden sıralanır */
#satirlar { counter-reset: satir; }
#satirlar tr { counter-increment: satir; }
.satir-tablo .s-no-bas { width: 2.2rem; }
.satir-tablo td.s-no { width: 2.2rem; padding-top: .55rem; text-align: right; }
.satir-tablo td.s-no::before { content: counter(satir) "."; color: #dc2626; font-weight: 700; font-variant-numeric: tabular-nums; }
.satir-tablo .s-aciklama::placeholder { text-transform: none; color: #a8b3c2; }
.satir-tablo .tutar-hucre { padding-top: .55rem; text-align: right; font-weight: 600; white-space: nowrap; }
@media (max-width: 767.98px) {
    .satir-tablo thead { display: none; }
    .satir-tablo, .satir-tablo tbody { display: block; }
    .satir-tablo tr { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; border: 1px solid var(--kenar); border-radius: 10px; padding: .5rem; margin-bottom: .5rem; }
    .satir-tablo td { display: block; padding: 0; }
    .satir-tablo td.genis { grid-column: 1 / -1; }
    .satir-tablo td.s-no { grid-column: 1 / -1; width: auto; padding: 0; text-align: left; }
    .satir-tablo .tutar-hucre { text-align: left; }
}
.kur-panel { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 12px; padding: .75rem .9rem; }
.hesap-ozet { background: #f8fafc; border: 1px solid var(--kenar); border-radius: 12px; padding: .75rem 1rem; }
.hesap-ozet .satir { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.hesap-ozet .satir.toplam { border-top: 1px dashed #cbd5e1; margin-top: .35rem; padding-top: .45rem; font-weight: 700; font-size: 1.05rem; }

/* modallar: telefonda tam ekran */
.modal-content { border: 0; border-radius: 16px; }
@media (max-width: 575.98px) { .modal-content { border-radius: 0; } }
.modal-header { border-bottom-color: var(--kenar); }
.modal-footer { border-top-color: var(--kenar); }

/* ------------------------------------------------------------------ boş / yükleniyor */
.bos { text-align: center; color: var(--soluk); padding: 2.5rem 1rem; }
.bos i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.yukleniyor { display: grid; place-items: center; padding: 3rem; color: var(--soluk); }

/* grafik (çubuk) */
.cubuk-grafik { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: .5rem; }
.cubuk-grafik .cubuk { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cubuk-grafik .cubuk span { width: 100%; max-width: 34px; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.cubuk-grafik .cubuk small { font-size: .68rem; color: var(--soluk); margin-top: .3rem; }

/* depo */
.urun-resim { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #f1f5f9; display: grid; place-items: center; color: #94a3b8; flex: 0 0 46px; }
.stok-kritik { color: var(--kirmizi); font-weight: 700; }

/* SweetAlert: uygulamanın yazı tipi */
.swal2-popup { font-family: inherit; border-radius: 16px; }
.swal2-toast { box-shadow: 0 8px 24px rgba(15, 23, 42, .18) !important; }

/* aramalı seçim kutusu (kalem) */
.ara-sec { position: relative; }
.ara-sec .as-girdi { padding-right: 1.6rem; }
.ara-sec .as-temizle { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #94a3b8; font-size: 1.1rem; line-height: 1; padding: 0 .2rem; }
.ara-sec .as-temizle:hover { color: var(--kirmizi); }
.ara-sec .as-girdi:disabled ~ .as-temizle, .ara-sec .as-girdi:placeholder-shown ~ .as-temizle { display: none; }
.as-liste { position: fixed; z-index: 2000; display: none; background: #fff; border: 1px solid var(--kenar); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18); overflow-y: auto; padding: .25rem 0; font-size: .85rem; }
.as-oge { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem .75rem; cursor: pointer; }
.as-oge small { color: var(--soluk); white-space: nowrap; font-variant-numeric: tabular-nums; }
.as-oge.aktif, .as-oge:hover { background: #eff6ff; }
.as-oge mark { background: #fde68a; padding: 0; border-radius: 2px; }
.as-grup { padding: .35rem .75rem .15rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--soluk); }
.as-bos { padding: .6rem .75rem; color: var(--soluk); }

/* ------------------------------------------------------------------ raporlar */
.rapor-turleri { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.rapor-tur { display: flex; align-items: center; gap: .45rem; white-space: nowrap; background: #fff; border: 1px solid var(--kenar); border-radius: 10px;
    padding: .5rem .85rem; font-weight: 500; color: #334155; box-shadow: var(--golge); }
.rapor-tur:hover { border-color: #bfdbfe; color: var(--vurgu); }
.rapor-tur.aktif { background: var(--vurgu); border-color: var(--vurgu); color: #fff; }
.rapor-filtre .kart-baslik .btn-link { font-size: .8rem; text-decoration: none; }
.secim-listesi { display: flex; flex-direction: column; gap: 2px; max-height: 170px; overflow-y: auto; border: 1px solid var(--kenar); border-radius: 8px; padding: .3rem; }
.secim-listesi.uzun { max-height: 200px; }
.secim-oge { display: flex; align-items: center; gap: .45rem; padding: .2rem .35rem; border-radius: 6px; cursor: pointer; font-size: .875rem; margin: 0; }
.secim-oge:hover { background: #f1f5f9; }
.secim-oge .form-check-input { margin: 0; flex: 0 0 auto; }
.rapor-arac .dropdown-menu { max-height: 60vh; overflow-y: auto; }
.sutun-menu { min-width: 250px; }
.sutun-menu .dropdown-item { cursor: pointer; font-size: .875rem; padding: .3rem .5rem; }
.gorunum-oge .dropdown-item { flex: 1; }
.rapor-tablo { min-height: 120px; transition: opacity .15s; }
.rapor-tablo.yukleniyor-soluk { opacity: .45; pointer-events: none; }
.tablo.rapor th { white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tablo.rapor th.siralanir { cursor: pointer; user-select: none; }
.tablo.rapor th.siralanir:hover { color: var(--vurgu); }
.tablo.rapor td { padding: .45rem .65rem; font-size: .86rem; vertical-align: top; }
.tablo.rapor tr.rapor-grup td { background: #eff6ff; font-weight: 600; color: #1e3a8a; }
.tablo.rapor tr.rapor-ara-toplam td { background: #f8fafc; font-weight: 600; }
.tablo.rapor tfoot td { background: #dbeafe; font-weight: 700; border-top: 2px solid #93c5fd; }
.rapor-tablo .table-responsive { max-height: calc(100vh - 260px); }
@media (max-width: 1199.98px) { .rapor-tablo .table-responsive { max-height: 70vh; } }
@media (max-width: 575.98px) { .rapor-arac > .ms-auto { margin-left: 0 !important; width: 100%; } .rapor-arac > .ms-auto .btn { flex: 1; } }
.rapor-filtre input[type=date] { min-width: 0; flex: 1 1 0; }
.rapor-filtre .filtre-ok { transition: transform .2s; color: var(--soluk); }
@media (max-width: 1199.98px) {
    .rapor-filtre .kart-baslik { cursor: pointer; }
    .rapor-filtre.kapali .kart-govde { display: none !important; }
    .rapor-filtre:not(.kapali) .filtre-ok { transform: rotate(180deg); }
}

/* ------------------------------------------------------------------ iş dosyaları (Drive) */
.min-w-0 { min-width: 0; }
.ds-dosya { display: flex; align-items: center; gap: .9rem; border: 1px solid var(--kenar); border-radius: 12px; padding: .75rem .9rem; background: #fff; flex-wrap: wrap; }
.ds-dosya > .flex-grow-1 { flex-basis: 220px; }
.ds-oge { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--kenar); }
.ds-galeri { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.ds-kucuk { border: 0; padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #e2e8f0; cursor: zoom-in; }
.ds-kucuk img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ds-kucuk:hover img { transform: scale(1.05); }
@media (max-width: 575.98px) { .ds-galeri { grid-template-columns: repeat(3, 1fr); gap: .3rem; } }
.ds-isik { position: fixed; inset: 0; z-index: 2000; background: rgba(2, 6, 23, .94); display: flex; align-items: center; justify-content: center; }
.ds-isik img { max-width: 100vw; max-height: calc(100vh - 110px); object-fit: contain; }
.ds-isik-ust { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; color: #e2e8f0;
    padding-top: max(.7rem, env(safe-area-inset-top)); }
.ds-isik-ust > span { flex: 1; min-width: 0; font-size: .9rem; }
.ds-isik-ok { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 64px;
    border-radius: 10px; font-size: 1.6rem; }
.ds-isik-ok:hover { background: rgba(255, 255, 255, .25); }
.ds-isik-ok.sol { left: 10px; } .ds-isik-ok.sag { right: 10px; }
.ds-isik-alt { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); color: #cbd5e1; font-size: .85rem; }
@media (max-width: 575.98px) { .ds-isik-ok { width: 38px; height: 52px; font-size: 1.2rem; background: rgba(255, 255, 255, .08); } }

/* ------------------------------------------------------------------ oturum / kullanıcı */
.kullanici-menu { margin-left: .25rem; }
.kullanici-dugme { padding: .2rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .95rem; }
.kullanici-menu .dropdown-menu { min-width: 250px; }
/* izleyici (salt okunur): yazma düğmeleri görünmez */
.salt-okunur #yeniIs, .salt-okunur #yeniFatura, .salt-okunur #faturaSil, .salt-okunur #faturaDuzenle, .salt-okunur #odemeGit,
.salt-okunur #pdfEkle, .salt-okunur #pdfDegistir, .salt-okunur #pdfSil, .salt-okunur #yenidenHesapla, .salt-okunur .grup-sec, .salt-okunur .is-sec,
.salt-okunur .secim-cubugu, .salt-okunur .is-duzenle, .salt-okunur #isSil, .salt-okunur .modal-footer [type=submit],
.salt-okunur #ustAraclar .btn-primary, .salt-okunur #ustAraclar .btn-success, .salt-okunur .yazma,
.salt-okunur [data-yazma], .salt-okunur .btn-outline-danger:not(.disari) { display: none !important; }

/* giriş sayfası */
.giris-sayfa { min-height: 100vh; display: grid; place-items: center; padding: 16px;
    background: radial-gradient(1200px 600px at 10% -10%, #dbeafe, transparent), radial-gradient(900px 500px at 110% 110%, #e0e7ff, transparent), var(--ana-zemin); }
.giris-kutu { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 28px 24px; box-shadow: 0 20px 50px rgba(15, 23, 42, .12); }
.giris-marka { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.giris-marka img { border-radius: 14px; }
.giris-marka h1 { font-size: 1.45rem; font-weight: 800; margin: 0; }
.giris-passkey { padding: .85rem 1rem; font-weight: 600; border-radius: 12px; }
.giris-ayrac { display: flex; align-items: center; gap: .75rem; color: var(--soluk); font-size: .8rem; margin: 18px 0; }
.giris-ayrac::before, .giris-ayrac::after { content: ""; flex: 1; height: 1px; background: var(--kenar); }
.pk-oge { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--kenar); border-radius: 10px; }
.salt-okunur #excelAktar, .salt-okunur #yilKopyala, .salt-okunur #farkAc, .salt-okunur #yilSil, .salt-okunur #yeniPaket, .salt-okunur #paketSatirEkle,
.salt-okunur .k-duzenle, .salt-okunur .k-sil, .salt-okunur .u-hareket[data-tur], .salt-okunur #odemeSil, .salt-okunur #resimSilKutu,
.salt-okunur #farkOlustur, .salt-okunur #isDosyalar + .yazma { display: none !important; }
/* kullanıcı yetki tablosu */
.yetki-tablo { border: 1px solid var(--kenar); border-radius: 10px; padding: .4rem .6rem; max-height: 46vh; overflow-y: auto; }
.yetki-satir { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-bottom: 1px dashed #eef2f7; }
.yetki-satir:last-child { border-bottom: 0; }
.yetki-satir > span { font-size: .9rem; }
.yetki-ust { justify-content: flex-end; gap: .35rem; }
.yetki-ust > span { margin-right: auto; }
.yetki-grup { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soluk); font-weight: 700; margin-top: .5rem; }
@media (max-width: 575.98px) { .yetki-satir { flex-wrap: wrap; } .yetki-satir .btn-group { width: 100%; } .yetki-satir .btn-group .btn { flex: 1; } }

/* borç verilen malzemeler */
.borc-tablo td.c-malzeme { min-width: 13rem; }
.borc-fiyat { text-align: right; min-width: 0; }
@media (max-width: 767.98px) { .borc-tablo td.c-malzeme { min-width: 0; } .borc-fiyat .text-truncate { max-width: 13rem !important; margin-left: auto; } }

/* bildirimler */
.salt-okunur .yazilabilir .modal-footer [type=submit] { display: inline-block !important; }
.yan-rozet { margin-left: auto; background: #dc2626; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; }
.bildirim-zil .zil-rozet { position: absolute; top: 2px; right: 0; background: #dc2626; color: #fff; border-radius: 999px; font-size: .62rem; font-weight: 700; padding: 0 .35rem; line-height: 1.35; }
.bildirim-kart { border: 1px solid var(--kenar); border-radius: 12px; background: #fff; padding: .85rem 1rem; }
.bildirim-kart.yeni { border-left: 4px solid #dc2626; }
.bildirim-kart.cozuldu { opacity: .75; }
.bildirim-kart .mesaj { white-space: pre-wrap; margin: .35rem 0; }

/* Word önizleme çerçevesi */
.ds-word { width: 100%; min-height: 60vh; border: 0; border-radius: 10px; background: #e2e8f0; display: block; }

/* arama */
.arama-kutu .form-control { font-size: 1.05rem; }
.arama-bas { font-size: 1rem; font-weight: 700; margin: 0 0 .6rem; display: flex; align-items: center; gap: .45rem; }
.arama-cip { display: inline-block; background: #f1f5f9; border-radius: 999px; padding: .05rem .5rem; margin: .1rem .15rem .1rem 0; white-space: nowrap; }
.arama-saha { border-left: 4px solid var(--bs-primary, #2563eb); }
.arama-tablo td { vertical-align: top; }
.arama-tablo .kalem-liste { min-width: 14rem; }
.donem-cizgi { border-left: 2px solid #cbd5e1; padding-left: .8rem; display: grid; gap: .35rem; }
.donem { position: relative; display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; }
.donem::before { content: ''; position: absolute; left: calc(-.8rem - 6px); top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: #2563eb; }
.donem-ad { font-weight: 600; }
@media (max-width: 767.98px) { .arama-tablo .kalem-liste { min-width: 0; } }

/* fatura önizleme: e-Arşiv fatura düzeni (GİB) */
.efatura { background: #fff; color: #111; font: 12px/1.35 "Times New Roman", "Liberation Serif", Georgia, serif; padding: 18px; max-width: 1000px; margin: 0 auto; box-shadow: 0 1px 8px rgba(0,0,0,.12); }
.efatura .ef-ust, .efatura .ef-orta { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 14px; }
.efatura .ef-blok { max-width: 420px; }
.efatura .ef-cizgi { border-top: 4px double #111; margin: 4px 0 6px; }
.efatura .ef-pre { white-space: pre-line; }
.efatura .ef-logo { text-align: center; font: 700 15px/1.3 Arial, sans-serif; color: #333; padding-top: 30px; }
.efatura .ef-gib { width: 76px; height: 76px; border-radius: 50%; border: 3px solid #c00; color: #c00; display: grid; place-items: center; font-size: 34px; margin: 0 auto 8px; }
.efatura .ef-bilgi { justify-self: end; align-self: end; border-collapse: collapse; font-size: 12px; min-width: 260px; }
.efatura .ef-bilgi th, .efatura .ef-bilgi td { border: 1px solid #999; padding: 1px 6px; text-align: left; }
.efatura .ef-bilgi th { font-weight: 700; }
.efatura .ef-tablo-kap { overflow-x: auto; }
.efatura .ef-tablo { width: 100%; min-width: 640px; border-collapse: collapse; border: 2px solid #111; font-size: 11.5px; }
.efatura .ef-tablo th { border: 1px solid #111; padding: 3px; text-align: center; font-weight: 700; vertical-align: middle; }
.efatura .ef-tablo td { border: 1px solid #666; padding: 2px 4px; text-align: right; vertical-align: top; }
.efatura .ef-tablo td.sol { text-align: left; }
.efatura .ef-tablo td.kucuk { font-size: 10px; }
.efatura .ef-toplam { margin: 10px 0 0 auto; border-collapse: separate; border-spacing: 0 2px; font-size: 12px; }
.efatura .ef-toplam th { border: 2px solid #111; padding: 1px 6px; text-align: right; font-weight: 700; }
.efatura .ef-toplam td { border: 2px solid #111; padding: 1px 6px; text-align: right; min-width: 110px; }
.efatura .ef-not { border: 2px solid #111; margin-top: 16px; padding: 22px 20px; font-size: 12px; min-height: 70px; }
.efatura .ef-uyari { margin-top: 8px; font: 12px Arial, sans-serif; color: #b45309; }
@media (max-width: 767.98px) { .efatura { padding: 10px; } .efatura .ef-ust, .efatura .ef-orta { grid-template-columns: 1fr; } .efatura .ef-bilgi { justify-self: stretch; } .efatura .ef-logo { padding-top: 0; } }

/* Arama: Gmail sonuçları */
.gm-liste { max-height: 520px; overflow: auto; }
.gm-posta { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid rgba(0, 0, 0, .07); background: none; text-align: left; color: inherit; }
.gm-posta:first-child { border-top: 0; }
.gm-posta:hover { background: rgba(37, 99, 235, .06); }
.gm-orta { flex: 1; min-width: 0; display: grid; }
.gm-kisi { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-konu { font-size: .875rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-sag { display: grid; justify-items: end; font-size: .85rem; }
.gm-bas { padding: 14px 18px; display: grid; gap: 4px; font-size: .9rem; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.gm-bas .text-soluk { display: inline-block; min-width: 56px; }
.gm-ekler { display: grid; gap: 6px; padding: 12px 18px; border-bottom: 1px solid rgba(0, 0, 0, .08); background: rgba(0, 0, 0, .02); }
.gm-ek { display: flex; align-items: center; gap: 10px; }
.gm-ek a.text-break { flex: 1; min-width: 0; }
.gm-icerik { display: block; width: 100%; height: 60vh; border: 0; background: #fff; }
.arama-bas { flex-wrap: wrap; row-gap: .1rem; } .arama-bas > span { font-size: .85rem; }
.secim-cubugu:not(.acik) { visibility: hidden; transition: transform .2s, visibility 0s .2s; }

/* ------------------------------------------------------------------ panel: renkli özet kartları */
.ozet-kart { position: relative; overflow: hidden; border: 1px solid var(--oz-kenar, var(--kenar));
    background: linear-gradient(135deg, var(--oz-acik, #fff) 0%, #fff 72%); }
.ozet-kart::after { content: ''; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%;
    background: var(--oz-ana); opacity: .09; pointer-events: none; }
.ozet-kart .ozet-ikon { background: var(--oz-ana); color: #fff; box-shadow: 0 6px 14px -6px var(--oz-ana); }
.ozet-kart .deger { color: var(--oz-koyu, #0f172a); }

/* panel: mobil satır listesi (kart içinde kart yerine sıkı, renkli satırlar) */
.pl-liste { display: flex; flex-direction: column; }
.pl-satir { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; color: inherit; text-decoration: none;
    border-bottom: 1px solid var(--kenar); position: relative; }
.pl-satir:last-child { border-bottom: 0; }
.pl-satir::before { content: ''; position: absolute; left: 0; top: .7rem; bottom: .7rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--renk, var(--vurgu)); }
.pl-satir:active { background: #f8fafc; }
.pl-ikon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem;
    color: var(--renk, var(--vurgu)); background: color-mix(in srgb, var(--renk, var(--vurgu)) 14%, #fff); }
.pl-orta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.pl-orta b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-orta small, .pl-sag small { color: var(--soluk); font-size: .76rem; line-height: 1.3; }
.pl-sag { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex: 0 0 auto; text-align: right; }
.pl-sag b { font-size: .95rem; }
.pl-ilerleme { display: block; height: 5px; border-radius: 5px; background: #fde68a; overflow: hidden; margin: .3rem 0 .15rem; max-width: 160px; }
.pl-ilerleme i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); border-radius: 5px; }
.pl-yas { font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px; }
.yas-normal { background: #e0f2fe; color: #075985; }
.yas-turuncu { background: #ffedd5; color: #9a3412; }
.yas-kirmizi { background: #fee2e2; color: #991b1b; }

/* panel: aylık grafikte içinde bulunulan ay */
.cubuk-grafik .cubuk.bu-ay span { background: linear-gradient(180deg, #fbbf24, #f97316); }
.cubuk-grafik .cubuk.bu-ay small { color: #c2410c; font-weight: 700; }
@media (max-width: 767.98px) {
    #panel .kart-baslik { flex-wrap: wrap; }
    #panel .kart-baslik > .ms-auto.text-soluk { flex-basis: 100%; margin-left: 0 !important; margin-top: .15rem; }
    .cubuk-grafik { height: 130px; gap: 4px; }
}

/* ------------------------------------------------------------------ mobil sıkı satır (tablo.kartlasan.sik)
   üst satır: başlık (kart-bas) + sağda ana tutar (m-sag); altında küçük ayrıntılar; solda kayıt rengi şeridi */
@media (max-width: 767.98px) {
    .tablo.kartlasan.sik tbody { display: flex; flex-direction: column; gap: .5rem; }
    .tablo.kartlasan.sik tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1rem; row-gap: .15rem; margin: 0;
        padding: .7rem .85rem .7rem 1rem; position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
    .tablo.kartlasan.sik tr::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--renk, var(--vurgu)); }
    .tablo.kartlasan.sik td { display: inline-flex; align-items: baseline; gap: .3rem; width: auto; padding: 0; text-align: left;
        order: 2; font-size: .8rem; color: var(--soluk); flex-wrap: wrap; }
    .tablo.kartlasan.sik td::before { font-size: .72rem; font-weight: 500; }
    .tablo.kartlasan.sik td:empty, .tablo.kartlasan.sik td.m-gizle { display: none; }
    .tablo.kartlasan.sik td > div { display: inline; }
    .tablo.kartlasan.sik td > div::before { content: '· '; }
    .tablo.kartlasan.sik td.kart-bas { order: 0; flex: 1 1 calc(100% - 9.5rem); min-width: 0; font-size: .97rem; color: #0f172a; display: block; }
    .tablo.kartlasan.sik td.kart-bas > div { display: block; }
    .tablo.kartlasan.sik td.kart-bas > div::before { content: none; }
    .tablo.kartlasan.sik td.m-sag { order: 1; margin-left: auto; font-size: .97rem; font-weight: 700; color: #0f172a; }
    .tablo.kartlasan.sik td.m-sag.text-success { color: var(--yesil); }
    .tablo.kartlasan.sik td.m-alt { order: 2; }
    .tablo.kartlasan.sik td.m-son { order: 3; margin-left: auto; }
    .tablo.kartlasan.sik td.m-sag::before { display: none; }
    .tablo.kartlasan.sik tr::after { content: ''; order: 1; flex-basis: 100%; height: 0; }   /* başlık + tutar satırından sonra ayrıntılar alt satıra */
    .tablo.kartlasan.sik td.fw-600:not(.m-sag) { color: #0f172a; }
    .tablo.kartlasan.sik td.text-danger { color: var(--kirmizi) !important; font-weight: 600; }
    .tablo.kartlasan.sik .rozet { font-size: .7rem; }
}

/* özet kartları: sayfalarda renk sınıfı verilmemişse sırayla mavi / mor / yeşil / turuncu (panel kendi renklerini verir) */
:where(.row > :nth-child(4n+1)) > .ozet-kart { --oz-ana: #3b82f6; --oz-acik: #eef4ff; --oz-kenar: #c7dbfe; --oz-koyu: #1e3a8a; }
:where(.row > :nth-child(4n+2)) > .ozet-kart { --oz-ana: #8b5cf6; --oz-acik: #f5f0ff; --oz-kenar: #ddd0fd; --oz-koyu: #4c1d95; }
:where(.row > :nth-child(4n+3)) > .ozet-kart { --oz-ana: #10b981; --oz-acik: #ecfdf5; --oz-kenar: #b7efd8; --oz-koyu: #065f46; }
:where(.row > :nth-child(4n+4)) > .ozet-kart { --oz-ana: #f59e0b; --oz-acik: #fff7e6; --oz-kenar: #fde7b0; --oz-koyu: #92400e; }
.ozet-kart .deger.text-danger { color: var(--kirmizi) !important; }

/* panelin özel renkleri (yukarıdaki sıralı renkleri ezer) */
.ozet-amber  { --oz-ana: #f59e0b; --oz-acik: #fff7e6; --oz-kenar: #fde7b0; --oz-koyu: #92400e; }
.ozet-kirmizi { --oz-ana: #ef4444; --oz-acik: #fff0f0; --oz-kenar: #fecaca; --oz-koyu: #991b1b; }
.ozet-mavi   { --oz-ana: #3b82f6; --oz-acik: #eef4ff; --oz-kenar: #c7dbfe; --oz-koyu: #1e40af; }
.ozet-yesil  { --oz-ana: #10b981; --oz-acik: #ecfdf5; --oz-kenar: #b7efd8; --oz-koyu: #065f46; }

/* ================================================================== görünüm 2: onay kutusu, grup kartları, pencereler */
/* seçim kutuları: büyük, yuvarlak köşeli, işaretlenince "pop" */
.form-check-input.is-sec, .form-check-input.grup-sec {
    width: 1.4rem; height: 1.4rem; margin: 0; flex: 0 0 auto; cursor: pointer; border: 2px solid #cbd5e1; border-radius: .5rem !important;
    background-color: #fff; background-size: 72%; transition: background-color .18s, border-color .18s, box-shadow .18s, transform .12s; }
.form-check-input.is-sec:hover, .form-check-input.grup-sec:hover { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.form-check-input.is-sec:active, .form-check-input.grup-sec:active { transform: scale(.88); }
.form-check-input.is-sec:focus, .form-check-input.grup-sec:focus { box-shadow: 0 0 0 4px rgba(59,130,246,.2); }
.form-check-input.is-sec:checked, .form-check-input.grup-sec:checked, .form-check-input.grup-sec:indeterminate {
    background-color: #2563eb; border-color: #2563eb; box-shadow: 0 5px 12px -4px rgba(37,99,235,.6); animation: kutu-pop .3s cubic-bezier(.3,1.5,.5,1); }
@keyframes kutu-pop { 0% { transform: scale(.75); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* grup kartları: duruma göre renk (sol şerit + başlık tonu + simge karosu) */
.grup { --g-ana: #3b82f6; --g-acik: #f3f7ff; border-radius: 14px; position: relative; border-color: var(--kenar); }
.grup::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--g-ana); z-index: 1; }
/* sabit renk ölçeği: faturalanmamış / iTools'a eklenmemiş kırmızı · iTools'a eklendi mavi · faturalı ödenmemiş sarı ·
   fatura tarihinden 1 aydan fazla geçmiş turuncu · ödendi yeşil · arşivdeki işler mor */
.grup[data-durum="bekleyen"] { --g-ana: #ef4444; --g-acik: #fff1f1; }
.grup[data-durum="itools"]   { --g-ana: #3b82f6; --g-acik: #eff5ff; }
.grup[data-durum="bekliyor"] { --g-ana: #eab308; --g-acik: #fefbe8; }
.grup[data-durum="gecikti"]  { --g-ana: #f97316; --g-acik: #fff3eb; }
.grup[data-durum="odendi"]   { --g-ana: #10b981; --g-acik: #effcf6; }
.grup[data-durum="arsivis"]  { --g-ana: #8b5cf6; --g-acik: #f5f3ff; }
.grup[data-durum="iade"], .grup[data-durum="arsiv"] { --g-ana: #94a3b8; --g-acik: #f6f8fb; }
.grup[data-durum="arsivis"] .is-satir td { color: #5b5670; }
.rozet-arsiv { background: #ede9fe; color: #5b21b6; }
.rozet-gecikti { background: #ffedd5; color: #9a3412; }
.rozet-gecikme { background: #fee2e2; color: #991b1b; }
/* fatura listesi: iş sayfalarındaki grup görünümü (durum şeridi + açık renkten beyaza zemin + durum simgesi)
   ödendi yeşil · ödeme bekliyor (kısmi dahil) sarı · fatura tarihinden 1 aydan fazla geçmiş, ödenmemiş kırmızı */
.tablo tr[data-fd="odendi"]   { --g-ana: #10b981; --g-acik: #effcf6; }
.tablo tr[data-fd="bekliyor"] { --g-ana: #eab308; --g-acik: #fefbe8; }
.tablo tr[data-fd="gecikti"]  { --g-ana: #ef4444; --g-acik: #fff1f1; }
.tablo tr[data-fd] { background: linear-gradient(90deg, var(--g-acik), #fff 75%); }
.tablo tr[data-fd] td, .tablo tbody tr[data-fd]:hover td { background: transparent; }
.tablo tbody tr[data-fd]:hover { background: var(--g-acik); }
.tablo tr[data-fd] td:first-child { box-shadow: inset 4px 0 var(--g-ana); }
.fd-ikon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .9rem; vertical-align: middle;
    color: var(--g-ana, var(--soluk)); background: color-mix(in srgb, var(--g-ana, #94a3b8) 15%, #fff); }
@media (max-width: 767.98px) {
    .tablo.kartlasan tr[data-fd] { border-color: color-mix(in srgb, var(--g-ana) 30%, #fff); }
    .tablo.kartlasan.sik tr[data-fd]::before { background: var(--g-ana); }
    .tablo.kartlasan tr[data-fd] td:first-child { box-shadow: none; }
}
.rozet-talep { background: #dcfce7; color: #166534; font-size: .68rem; padding: .1rem .45rem; vertical-align: middle; }
.grup[data-durum] .grup-baslik { background: linear-gradient(90deg, var(--g-acik), #fff 70%); padding: .8rem 1rem .8rem 1.15rem; }
.grup-ikon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem;
    color: var(--g-ana); background: color-mix(in srgb, var(--g-ana) 15%, #fff); }
.grup-bilgi { display: flex; align-items: center; gap: .45rem .6rem; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.grup-baslik .toplamlar .tutar { font-size: 1.05rem; }
.grup:not(.kapali) .grup-baslik { border-bottom: 1px solid var(--kenar); }
.grup .grup-govde .is-tablo thead th { background: #fafbfd; }

/* iş satırı: seçiliyken mavi ton + sol çizgi; dokunmatikte "hover" takılı kalmaz */
@media (hover: none) { .tablo tbody tr:hover td { background: transparent; } }
.is-tablo tr.is-satir.secili td { background: #eff6ff !important; }
.is-tablo tr.is-satir.secili td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
.is-satir .is-ozet { display: inline-block; background: #f1f5f9; color: #475569; border-radius: 99px; padding: 0 .5rem; font-size: .72rem; margin-top: .2rem; }
.is-satir .is-kod { font-weight: 700; }
@media (max-width: 767.98px) {
    .grup-ikon { width: 32px; height: 32px; flex-basis: 32px; font-size: .95rem; border-radius: 10px; }
    .is-tablo tr.is-satir { border-bottom: 1px solid #eef2f7; }
    .is-tablo tr.is-satir.secili { background: #eff6ff; box-shadow: inset 3px 0 0 #3b82f6; }
    .is-tablo tr.is-satir.secili td:first-child { box-shadow: none; }
}

/* pencereler (genel) */
.modal-content { border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(15,23,42,.45); }
.modal-header { background: linear-gradient(180deg, #fff, #f8fafc); padding: .9rem 1.25rem; }
.modal-title { font-weight: 700; font-size: 1.1rem; }
.modal-footer { background: #f8fafc; padding: .7rem 1.1rem; }
.modal-backdrop.show { opacity: .5; }
@media (max-width: 767.98px) { .modal-fullscreen-md-down .modal-content { border-radius: 0; } }

/* iş penceresi */
.is-modal .modal-header { gap: .8rem; align-items: center;
    background: linear-gradient(120deg, color-mix(in srgb, var(--tip-renk) 13%, #fff), #fff 65%); border-bottom-color: color-mix(in srgb, var(--tip-renk) 20%, var(--kenar)); }
.is-modal-ikon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem;
    color: #fff; background: var(--tip-renk); box-shadow: 0 8px 18px -8px var(--tip-renk); }
.is-modal-ad { min-width: 0; }
.is-alt-baslik { font-size: .8rem; color: var(--soluk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-modal .modal-body { background: #f5f7fb; }
.is-modal .is-bolum { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; padding: .6rem .5rem .8rem; margin: 0; }
.is-modal .kur-panel { border-radius: 14px; }
.bolum-baslik { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.bolum-baslik i { color: var(--tip-renk, var(--vurgu)); }
.is-modal .table-responsive-md { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; padding: .25rem .5rem; }
.is-modal .satir-tablo thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--soluk); font-weight: 600; border-bottom-color: var(--kenar); }
.is-modal .satir-tablo td { border-bottom-color: #eef2f7; }
.is-modal .satir-tablo td.s-no::before { content: counter(satir); display: inline-grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 50%;
    font-size: .74rem; color: var(--tip-renk); background: color-mix(in srgb, var(--tip-renk) 14%, #fff); }
.is-modal .satir-tablo .form-control { border-color: #e2e8f0; background-color: #fbfcfe; }
.is-modal .satir-tablo .form-control:focus { background-color: #fff; }
.is-modal .satir-tablo .s-sil { background: transparent; border: 0; opacity: .6; }
.is-modal .satir-tablo .s-sil:hover { opacity: 1; background: #fee2e2; }
.is-modal .hesap-ozet { background: #fff; border-radius: 14px; }
.is-modal .modal-footer { gap: .5rem; }
.is-modal .modal-footer #isBildir { margin-right: 0 !important; }
.is-alt-toplam { margin-right: auto; display: flex; flex-direction: column; line-height: 1.15; }
.is-alt-toplam span { font-size: .72rem; color: var(--soluk); }
.is-alt-toplam b { font-size: 1.15rem; color: #0f172a; }
.is-alt-toplam small.tutar { font-size: .75rem; color: var(--soluk); }
@media (max-width: 767.98px) {
    .is-modal .modal-header { padding: .75rem 1rem; }
    .is-modal-ikon { width: 38px; height: 38px; flex-basis: 38px; font-size: 1.05rem; }
    .is-modal .modal-body { padding: .85rem; }
    .is-modal .table-responsive-md { background: none; border: 0; padding: 0; }
    /* her kalem tek kart: [no] kalem [sil] / açıklama / miktar x fiyat = tutar */
    .is-modal .satir-tablo tr { grid-template-columns: 1.8rem 4.6rem 1fr auto; grid-template-areas: "no kalem kalem sil" "no ack ack ack" "no miktar fiyat tutar";
        gap: .4rem .45rem; background: #fff; border: 1px solid var(--kenar); border-radius: 14px; padding: .65rem .6rem; margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
    .is-modal .satir-tablo td.genis, .is-modal .satir-tablo td.s-no { grid-column: auto; }
    .is-modal .satir-tablo td.s-no { grid-area: no; padding-top: .2rem; }
    .is-modal .satir-tablo td.s-kalem-h { grid-area: kalem; min-width: 0; }
    .is-modal .satir-tablo td.s-ack-h { grid-area: ack; }
    .is-modal .satir-tablo td.s-miktar-h { grid-area: miktar; }
    .is-modal .satir-tablo td.s-fiyat-h { grid-area: fiyat; min-width: 0; position: relative; }
    .is-modal .satir-tablo td.s-fiyat-h::before { content: '\00d7'; position: absolute; left: -.42rem; top: .3rem; color: var(--soluk); font-size: .8rem; }
    .is-modal .satir-tablo td.s-tutar { grid-area: tutar; padding-top: .35rem; text-align: right; font-size: .95rem; min-width: 4.5rem; }
    .is-modal .satir-tablo td.s-sil-h { grid-area: sil; }
    .is-modal .satir-tablo .s-miktar { text-align: center; }
    /* toplam üstte tam satır (sıkışıp kesilmesin), düğmeler altta; Kaydet kalan genişliği doldurur */
    .is-modal .modal-footer { flex-wrap: wrap; row-gap: .45rem; padding: .55rem .85rem calc(.6rem + env(safe-area-inset-bottom)); }
    .is-modal .modal-footer > * { margin: 0; }
    .is-modal .modal-footer .is-alt-toplam { flex: 1 0 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: .5rem;
        padding-bottom: .4rem; border-bottom: 1px dashed var(--kenar); }
    .is-modal .modal-footer .is-alt-toplam:empty { display: none; }
    .is-modal .modal-footer .is-alt-toplam span { font-size: .8rem; }
    .is-modal .modal-footer .is-alt-toplam small.tutar { flex-basis: 100%; text-align: right; }
    .is-modal .modal-footer .metin, .is-modal .modal-footer [data-bs-dismiss] { display: none; }
    .is-modal .modal-footer #isKaydet { flex: 1 1 auto; padding-inline: 1.1rem; }
}
.is-modal .satir-tablo > :not(caption) > * > * { background-color: transparent; box-shadow: none; }
@media (max-width: 767.98px) { .is-modal .satir-tablo td { border-bottom: 0; } }

/* ------------------------------------------------------------------ arama sayfası */
.arama-kutu { background: linear-gradient(135deg, #eef4ff 0%, #f8f5ff 45%, #fff 80%); border-color: #dbe6fb; }
.arama-kutu .input-group-lg { box-shadow: 0 6px 18px -10px rgba(37,99,235,.45); border-radius: 14px; }
.arama-kutu .input-group-lg > .input-group-text { border-radius: 14px 0 0 14px; border-color: #c7d7f7; color: #2563eb; }
.arama-kutu .input-group-lg > .form-control { border-radius: 0 14px 14px 0; border-color: #c7d7f7; }
.tip-cip { display: inline-flex; align-items: center; padding: .28rem .7rem; border-radius: 999px; font-size: .82rem; cursor: pointer; user-select: none;
    border: 1px solid color-mix(in srgb, var(--renk) 35%, #fff); background: #fff; color: #334155; transition: background .15s, color .15s, box-shadow .15s; }
.tip-cip:hover { background: color-mix(in srgb, var(--renk) 8%, #fff); }
.btn-check:checked + .tip-cip { background: var(--renk); border-color: var(--renk); color: #fff; box-shadow: 0 5px 12px -6px var(--renk); }
.btn-check:checked + .tip-cip .firma-nokta { background: #fff !important; }
.btn-check:focus-visible + .tip-cip { outline: 2px solid var(--renk); outline-offset: 2px; }

.arama-ozet { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.25rem 0 1rem; }
.arama-ozet-cip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; text-decoration: none; font-size: .85rem;
    color: color-mix(in srgb, var(--renk) 80%, #000); background: color-mix(in srgb, var(--renk) 11%, #fff); border: 1px solid color-mix(in srgb, var(--renk) 25%, #fff); }
.arama-ozet-cip:hover { background: color-mix(in srgb, var(--renk) 18%, #fff); }
.arama-ozet-cip i { color: var(--renk); }
#aramaSonuc section { scroll-margin-top: 80px; }

.arama-bas > i { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .95rem; color: #2563eb; background: #e8f0ff; }
.arama-saha { border-left: 4px solid var(--renk, #2563eb); position: relative; }
.arama-saha .rozet { background: color-mix(in srgb, var(--renk, #2563eb) 13%, #fff); color: color-mix(in srgb, var(--renk, #2563eb) 85%, #000); }
.arama-saha .saha-toplam { margin-top: .5rem; padding-top: .45rem; border-top: 1px dashed #e2e8f0; font-weight: 700; text-align: right; }
.saha-izgara.kisa > :nth-child(n+7) { display: none; }

/* arama iş geçmişi: mobil sıkı satırda yapılan işler tam genişlik */
@media (max-width: 767.98px) {
    .tablo.kartlasan.sik td.m-tam { order: 3; flex-basis: 100%; display: block; color: #334155; font-size: .82rem; margin-top: .25rem; }
    .tablo.kartlasan.sik td.m-tam > div { display: block; }
    .tablo.kartlasan.sik td.m-tam > div::before { content: none; }
    .tablo.kartlasan.sik td.m-tam .kalem-liste { padding-left: 1.3rem; }
    .tablo.kartlasan.sik td.m-fatura > div { display: inline; }
    .tablo.kartlasan.sik td.m-son { order: 4; }
    .arama-tablo.sik td.m-sag .small { display: block; font-weight: 400; font-size: .72rem; }
    .arama-tablo.sik td.m-sag { flex-direction: column; align-items: flex-end; }
}
.kalem-daha { display: none; }
@media (max-width: 767.98px) {
    .tablo.kartlasan.sik td.m-sag > div::before { content: none; }
    .m-tam.kisalt .kalem-liste li:nth-child(n+5) { display: none; }
    .kalem-daha { display: inline-block; margin-top: .3rem; border: 0; background: #eef2ff; color: #4338ca; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: .15rem .65rem; }
    .arama-saha { padding: .8rem .9rem; }
}

/* ------------------------------------------------------------------ genel dokunuşlar: kart başlığı simgesi, sekmeler, boş durum */
.kart-baslik > i.bi:first-child { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .95rem;
    background: color-mix(in srgb, currentColor 13%, #fff); }
.kart-baslik > i.bi:first-child:not([class*="text-"]) { color: var(--vurgu); }
.nav-pills .nav-link { border-radius: 999px; background: #fff; border: 1px solid var(--kenar); color: #334155; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.nav-pills .nav-link:hover { background: #f1f5ff; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: linear-gradient(135deg, #3b82f6, #2563eb); border-color: #2563eb; color: #fff; box-shadow: 0 6px 14px -8px rgba(37,99,235,.8); }
#firmaSekme .nav-link { border-radius: 14px; }
.bos > i.bi:first-child { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .75rem; font-size: 1.7rem;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff); color: #6366f1; opacity: 1; }
.kart { border-radius: 14px; }
.nav-pills .nav-link.active .firma-nokta { background: #fff !important; }

/* kabul sistemine hızlı geçiş (üst çubuk) */
.sistem-gecis { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem .35rem .45rem; border-radius: 999px; text-decoration: none;
    font-weight: 600; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #2f63ec, #1a3fae); box-shadow: 0 4px 12px -4px rgba(35,82,216,.6);
    white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.sistem-gecis > i:first-child { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); font-size: .85rem; }
.sistem-gecis .ok { font-size: 1.1rem; margin-left: -.15rem; }
.sistem-gecis:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(35,82,216,.7); }
.sistem-gecis-konum { background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 4px 12px -4px rgba(15,118,110,.6); }
.sistem-gecis-konum:hover { box-shadow: 0 6px 16px -4px rgba(15,118,110,.7); }
@media (max-width: 575.98px) { .sistem-gecis span, .sistem-gecis .ok { display: none; } .sistem-gecis { padding: .3rem; } }

/* Ayarlar > Gmail > kurumsal e-posta imzası */
.imza-onizleme { background: #fff; border: 1px dashed #d8dce6; border-radius: 12px; padding: 22px; overflow-x: auto; min-height: 140px; }
.imza-not { background: #fff8f8; border: 1px solid #fde2e4; border-radius: 12px; padding: 14px 16px; font-size: .88rem; }
.imza-not ol li { margin: 2px 0; }
@media (max-width: 575.98px) { .imza-kisi { padding-bottom: .4rem; border-bottom: 1px dashed #e2e8f0; } }

/* iş sayfası: seçim çubuğu düğmeleri, seçili işleri dışa aktar */
.secim-dugmeler { justify-content: flex-end; }
@media (max-width: 767.98px) {
    /* telefonda çubuk ekran genişliğinde; düğmeler yan yana (iki sıraya taşabilir) */
    .secim-cubugu { left: .6rem; right: .6rem; max-width: none; transform: translateY(150%); padding: .6rem .65rem; gap: .5rem; }
    .secim-cubugu.acik { transform: translateY(0); }
    .secim-cubugu > div:first-child { width: 100%; font-size: .9rem; }
    .secim-dugmeler { width: 100%; justify-content: stretch; gap: .4rem !important; }
    .secim-dugmeler .btn { flex: 1 1 auto; white-space: nowrap; }
}
.aktar-sutunlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .35rem .75rem; }
.aktar-sutun { display: flex; align-items: center; gap: .45rem; padding: .35rem .55rem; border: 1px solid var(--kenar); border-radius: 10px; cursor: pointer; font-size: .9rem; }
.aktar-sutun:has(input:checked) { background: #eff6ff; border-color: #bfdbfe; }
.aktar-sutun .form-check-input { margin: 0; }

/* Karel hakediş talebi penceresi */
.talep-modal .modal-header { gap: .8rem; align-items: center; background: linear-gradient(120deg, #ecfdf5, #fff 65%); }
.talep-ikon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem; color: #fff; background: #16a34a;
    box-shadow: 0 8px 18px -8px #16a34a; }
.talep-modal .modal-body { background: #f5f7fb; }
.talep-alanlar { display: grid; grid-template-columns: auto 1fr; gap: .45rem .75rem; align-items: center; background: #fff; border: 1px solid var(--kenar);
    border-radius: 14px; padding: .75rem .9rem; margin-bottom: .75rem; }
.talep-alanlar > label, .talep-alanlar > span:first-of-type { font-size: .8rem; font-weight: 600; color: var(--soluk); margin: 0; }
.talep-rl { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; padding: .75rem .9rem; margin-bottom: .75rem; }
.talep-rl-tablo th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--soluk); font-weight: 600; white-space: nowrap; }
.talep-rl-tablo td { vertical-align: middle; }
.talep-rl-tablo input { min-width: 6.5rem; }
.talep-onizleme { background: #fff; border: 1px solid var(--kenar); border-radius: 14px; overflow: hidden; }
.talep-onizleme-bas { font-size: .78rem; font-weight: 600; color: var(--soluk); padding: .5rem .9rem; border-bottom: 1px solid var(--kenar); background: #fafbfd; }
.talep-onizleme iframe { width: 100%; height: 520px; border: 0; display: block; background: #fff; }
.talep-modal .modal-footer { gap: .5rem; }
.excel-gor { max-height: 420px; overflow: auto; border: 1px solid var(--kenar); border-radius: 10px; }
.excel-gor table { border-collapse: collapse; font-size: .74rem; white-space: nowrap; }
.excel-gor td { border: 1px solid #e2e8f0; padding: .2rem .45rem; }
.excel-gor tr.ex-gizli { display: none; }
.excel-gor tr.ex-baslik td { background: #f1f5f9; font-weight: 600; white-space: normal; min-width: 6rem; vertical-align: bottom; }
@media (max-width: 575.98px) {
    .talep-alanlar { grid-template-columns: 1fr; gap: .2rem; }
    .talep-onizleme iframe { height: 420px; }
    .talep-modal .modal-footer #talepNot { width: 100%; }
}
