/* ════════════════════════════════════════════════════════════════════════════
   TELEFON GÖRÜNÜMÜ (≤ 860px) — NOSCloud.Mobil'in dili (NatraMobilSales portu).
   app.css'ten SONRA yüklenir; masaüstünü etkileyen kural YOKTUR (her şey medya
   sorgusunda ya da yalnız telefonda görünen sınıflarda).
   Renkler tema değişkenlerinden: --ana (Brand) · --ana-koyu (BrandDark).
   ════════════════════════════════════════════════════════════════════════════ */

:root {
    /* Mobil Tema.SayfaFirca: marka %16 beyaza karışık → %5 → zemin (opak durak) */
    --tel-zemin: #F4F6FA;
    --sayfa-firca: linear-gradient(180deg,
        color-mix(in srgb, var(--ana) 16%, #fff) 0%,
        color-mix(in srgb, var(--ana) 5%, var(--tel-zemin)) 35%,
        var(--tel-zemin) 70%);
    --ana-koyuk: color-mix(in srgb, var(--ana-koyu) 78%, #000);
    --ana-golge: color-mix(in srgb, var(--ana) 35%, transparent);
    --alt-yuk: 62px;
}

/* Material Icons Round — mobil uygulamanın ikon fontu */
.mi {
    font-family: 'Material Icons Round'; font-weight: normal; font-style: normal;
    font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none;
    display: inline-block; white-space: nowrap; direction: ltr;
    -webkit-font-smoothing: antialiased; font-feature-settings: 'liga';
}

.tel-only, .alt-sekmeler { display: none; }
.tel-kart-liste { display: none; }

@media (max-width: 860px) {
    .tel-only { display: block; }
    .gen-only { display: none !important; }

    /* Sayfa zemini ve üst çubuk (UstCubuk = BrandDarker, beyaz yazı) */
    body, .nos-ana { background: var(--sayfa-firca) fixed; }
    .nos-ust {
        background: var(--ana-koyuk); color: #fff; border-bottom: 0;
        padding-top: env(safe-area-inset-top); height: calc(var(--ust) + env(safe-area-inset-top));
        box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    }
    .nos-ust .ikon-btn { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .25); }
    /* Koyu üst çubukta kullanıcı bloğu ve Çıkış: beyaz yazı, cam (yarı saydam) zemin.
       app.css'teki beyaz zeminli Çıkış burada beyaz-üstüne-beyaz kalıyordu. */
    .nos-ust .ust-kullanici { color: #fff; }
    .nos-ust .ust-ad strong { color: #fff; }
    .nos-ust .ust-ad small { color: rgba(255, 255, 255, .75); }
    .nos-ust .ust-avatar { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); }
    .nos-ust .ust-cikis {
        color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4);
    }
    .nos-ust .ust-cikis:hover, .nos-ust .ust-cikis:active { background: #fff; color: var(--ana-koyu); }
    .nos-icerik { padding-bottom: calc(var(--alt-yuk) + 18px + env(safe-area-inset-bottom)); }

    /* ── Alt sekmeler ── */
    .alt-sekmeler {
        display: grid; grid-template-columns: repeat(3, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        height: calc(var(--alt-yuk) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff; border-top: 1px solid #E2E8F0;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
    }
    .alt-sekme {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 2px; color: #94A3B8; text-decoration: none; font-size: .72rem; font-weight: 600;
    }
    .alt-sekme .mi { font-size: 25px; padding: 2px 18px; border-radius: 999px; transition: background .15s; }
    .alt-sekme.secili { color: var(--ana); }
    .alt-sekme.secili .mi { background: color-mix(in srgb, var(--ana) 14%, transparent); }
    .alt-rozet {
        position: absolute; top: 5px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px;
        border-radius: 9px; background: #DC2626; color: #fff; font-size: .66rem; line-height: 18px; text-align: center;
    }
    /* Popup/modal açıkken alt çubuk onların altında kalsın */
    .da-katman, .evrak-katman { z-index: 1200; }
}

/* ── Ana Sayfa (telefon) ─────────────────────────────────────────────────── */
.tel-ana, .tel-sayfa { max-width: 720px; margin: 0 auto; }
.tel-hero {
    display: flex; align-items: center; gap: 12px; padding: 18px 16px; border-radius: 24px; color: #fff;
    background: linear-gradient(135deg, var(--ana), var(--ana-koyuk));
    box-shadow: 0 8px 18px var(--ana-golge); margin-bottom: 14px;
}
.tel-cam {
    display: grid; place-items: center; color: #fff; text-decoration: none; flex: none;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
.tel-hero-ikon { width: 48px; height: 48px; border-radius: 16px; }
.tel-hero-ikon .mi { font-size: 26px; }
.tel-hero-metin { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tel-hero-metin small { color: rgba(255, 255, 255, .85); font-size: .8rem; }
.tel-hero-metin strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-hero-btn { width: 40px; height: 40px; border-radius: 50%; }
.tel-hero-btn .mi { font-size: 20px; }

.tel-eylem {
    display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 10px; border-radius: 16px;
    background: #fff; border: 1px solid #E2E8F0; color: #0F172A; text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}
.tel-eylem-ikon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none;
    background: color-mix(in srgb, var(--ana) 12%, #fff); color: var(--ana);
}
.tel-eylem-ikon .mi { font-size: 28px; }
.tel-eylem-metin { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tel-eylem-metin strong { font-size: .98rem; }
.tel-eylem-metin small { color: #64748B; font-size: .8rem; }
.tel-ok { color: #94A3B8; }

.tel-bolum { font-size: 1.05rem; font-weight: 700; margin: 18px 2px 10px; color: #0F172A; }
.tel-kutular { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .tel-kutular { grid-template-columns: repeat(3, 1fr); } }
.tel-kutu {
    position: relative; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 112px; padding: 14px; border-radius: 20px; color: #fff; text-decoration: none; overflow: hidden;
    background: linear-gradient(135deg, var(--a), var(--b));
    box-shadow: 0 6px 12px color-mix(in srgb, var(--a) 35%, transparent);
    transition: transform .12s;
}
.tel-kutu:active { transform: scale(.96); }
.tel-kutu-ikon { width: 46px; height: 46px; border-radius: 14px; }
.tel-kutu-ad { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.tel-kutular.sayac .tel-kutu { min-height: 132px; }
.tel-sayi { font-size: 1.9rem; font-weight: 800; line-height: 1; margin-top: 8px; }

/* ── M3 segment (Evrak Durumu, liste süzgeci) ── */
.m3-segment {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 4px 0 14px;
    border: 1px solid #CBD5E1; border-radius: 999px; overflow: hidden; background: #fff;
}
.m3-segment button {
    display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px;
    border: 0; border-right: 1px solid #CBD5E1; background: transparent; font-weight: 600; font-size: .86rem;
    color: #334155; cursor: pointer;
}
.m3-segment button:last-child { border-right: 0; }
.m3-segment button .mi { font-size: 18px; }
.m3-segment button.secili { background: color-mix(in srgb, var(--ana) 16%, #fff); color: var(--ana-koyu); }

/* ── Kart liste (Evrak Durumu) ── */
.tel-liste { display: flex; flex-direction: column; gap: 10px; }
.tel-kart {
    display: block; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid #E2E8F0;
    color: #0F172A; text-decoration: none; box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}
.tel-kart:active { background: #F8FAFC; }
.tel-kart-ust { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tel-kart-plaka { font-weight: 800; font-size: 1.05rem; margin: 4px 0; letter-spacing: .02em; }
.tel-kart-alt { display: flex; justify-content: space-between; gap: 8px; color: #64748B; font-size: .84rem; }
.tel-kart-alt span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-hap { padding: 3px 9px; border-radius: 10px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.tel-hap.uyari { background: #FEF3C7; color: #92400E; }
.tel-hap.bilgi { background: #DBEAFE; color: #1E40AF; }
.tel-hap.olumlu { background: #DCFCE7; color: #166534; }
.tel-bos { text-align: center; color: #64748B; padding: 40px 10px; }
.tel-bos.hata { color: #B91C1C; }

/* ── Listeler (ServisListe) ── */
.fb-ac { display: none; }
@media (max-width: 860px) {
    .liste-bas { flex-wrap: wrap; gap: 8px; }
    .liste-bas h1 { font-size: 1.15rem; flex: 1 1 100%; }
    .liste-bas .gorunum { display: none; }
    .filtre-bar { padding: 8px; gap: 6px; }
    .fb-ac { display: grid; }
    .fb-ac .mi { font-size: 20px; }
    .filtre-bar:not(.acik) > :not(.fb-ara):not(.fb-ac) { display: none; }
    .filtre-bar .fb-ara { min-width: 0 !important; }
    .filtre-bar.acik > select, .filtre-bar.acik > input[type=date] { flex: 1 1 45%; min-width: 0; }
    .kart-izgara { grid-template-columns: 1fr; gap: 10px; }
    .veri-kart { border-radius: 16px; box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
    .veri-kart .aksiyon { display: none; }
}

/* ── Evrak formları (ServisBelgeFormu, Araç Kabul/Teslim) ── */
.tel-ozet-ac { display: none; }
@media (max-width: 860px) {
    .bf-sekmeler { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .bf-sekmeler::-webkit-scrollbar { display: none; }
    .bf-sekmeler button { white-space: nowrap; flex: none; }
    .bf-kart, .kart { border-radius: 16px; }
    .bf-kart-bas { flex-wrap: wrap; gap: 8px; }
    .bf-kart-bas .bf-ekle-bar { display: none; }            /* telefonda "Ürün / Hizmet Ekle" kartların altında */
    .bf-kart-bas .barkod-kutu { width: 100%; max-width: none; }
    .bf-alt { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .bf-ozet:not(.acik) { display: none; }
    .tel-ozet-ac {
        display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0; padding: 14px 16px;
        border: 0; border-radius: 16px; color: #fff; font-weight: 700; cursor: pointer;
        background: linear-gradient(135deg, var(--ana), var(--ana-koyuk)); box-shadow: 0 6px 14px var(--ana-golge);
    }
    .tel-ozet-ac span:first-child { flex: 1; text-align: left; font-size: .85rem; letter-spacing: .04em; opacity: .9; }
    .tel-ozet-ac strong { font-size: 1.15rem; }
}
@media (max-width: 640px) {
    /* inline "repeat(2|3,1fr)" başlık ızgaralarını da tek sütuna indir */
    .bf-baslik { grid-template-columns: 1fr !important; }
    .bf-baslik > * { grid-column: auto !important; }
}

/* Kart satırlar */
.tel-kalemler { margin-top: 8px; }
.tel-kalem {
    padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: #fff; border: 1px solid #E2E8F0;
    cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}
.tel-kalem:active { background: #F8FAFC; }
.tel-kalem.kilitli { background: #F8FAFC; color: #64748B; }
.tel-kalem.bos { border-style: dashed; }
.tk-ust { display: flex; justify-content: space-between; gap: 10px; }
.tk-ad { font-weight: 700; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tk-tutar { font-weight: 800; color: var(--ana-koyu); white-space: nowrap; }
.tk-alt { display: flex; gap: 8px; flex-wrap: wrap; color: #64748B; font-size: .82rem; margin-top: 3px; }
.tk-kod { font-family: Menlo, monospace; color: #334155; }
.tk-cipler { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tk-cip { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #F1F5F9; color: #475569; }
.tk-cip.isk { background: #FEF3C7; color: #92400E; }
.tk-cip.onay0 { background: #FEF3C7; color: #92400E; }
.tk-cip.onay1 { background: #DCFCE7; color: #166534; }
.tk-cip.onay2 { background: #FEE2E2; color: #991B1B; }
.tel-urun-ekle {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px;
    border: 1.5px dashed var(--ana); border-radius: 14px; background: color-mix(in srgb, var(--ana) 7%, #fff);
    color: var(--ana-koyu); font-weight: 700; font-size: .95rem; cursor: pointer;
}

/* Miktar alt sayfası */
.tel-sayfa-katman {
    position: fixed; inset: 0; z-index: 1150; background: rgba(15, 23, 42, .5);
    display: flex; align-items: flex-end; justify-content: center;
}
.tel-alt-sayfa {
    width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: #fff;
    border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    animation: tas-gir .18s ease-out; box-shadow: 0 -10px 30px rgba(0, 0, 0, .2);
}
@keyframes tas-gir { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.tas-tutamak { width: 40px; height: 4px; border-radius: 2px; background: #CBD5E1; margin: 4px auto 10px; }
.tas-bas { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.tas-baslik { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tas-baslik strong { font-size: 1.05rem; }
.tas-baslik small { color: #64748B; font-family: Menlo, monospace; }
.tas-ikon { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #E2E8F0; background: #fff; color: var(--ana); display: grid; place-items: center; cursor: pointer; }
.tas-etiket { display: block; font-size: .76rem; font-weight: 600; color: #64748B; margin: 10px 0 4px; }
.tas-miktar { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; }
.tas-miktar button { height: 52px; border-radius: 14px; border: 0; background: color-mix(in srgb, var(--ana) 12%, #fff); color: var(--ana-koyu); cursor: pointer; }
.tas-miktar button .mi { font-size: 28px; }
.tas-miktar input { height: 52px; text-align: center; font-size: 1.4rem; font-weight: 800; border-radius: 14px; border: 1.5px solid #CBD5E1; }
.tel-alt-sayfa input, .tel-alt-sayfa select { width: 100%; height: 44px; border-radius: 12px; border: 1px solid #CBD5E1; padding: 0 10px; font-size: 1rem; background-color: #fff; }
.tas-izgara { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.tas-toplam { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ana) 8%, #fff); }
.tas-toplam span { color: #64748B; font-size: .85rem; }
.tas-toplam strong { font-size: 1.35rem; color: var(--ana-koyu); }
.tas-dugmeler { display: flex; gap: 10px; margin-top: 12px; }
.tas-dugmeler button { flex: 1; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 14px; }
.tas-dugmeler .mi { font-size: 20px; }

/* Kart her genişlikte tıklanabilir (ServisListe) */
.veri-kart.tikla { cursor: pointer; }
.veri-kart.tikla:active { background: #F8FAFC; }
