/* Bayi portal — login/kayıt + katalog ortak stiller */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Roboto:wght@400;500;700&display=swap");

:root {
    --mf-yesil: #18a24b;
    --mf-koyu: #128a3e;
    --mf-acik: #e7f6ec;
    --mf-cizgi: #e5e7eb;
    --bp-font: "Roboto", system-ui, -apple-system, sans-serif;
    --bp-font-display: "Manrope", "Roboto", system-ui, sans-serif;
}

body { font-family: var(--bp-font); }
h1, h2, h3 { font-family: var(--bp-font-display); letter-spacing: -.01em; }

.bayi-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border, rgba(255,255,255,.12));
}
.bayi-tabs button {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary, #94a3b8);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.bayi-tabs button.aktif {
    color: var(--text-primary, #f1f5f9);
    border-bottom-color: var(--accent-success, #10b981);
}
.bayi-panel { display: none; }
.bayi-panel.aktif { display: block; }
.bayi-msg {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.bayi-msg.ok { background: rgba(16,185,129,.15); color: #6ee7b7; }
.bayi-msg.err { background: rgba(239,68,68,.15); color: #fca5a5; }

/* Giriş ekranı — "şifremi unuttum" / "girişe dön" bağlantıları */
.bayi-link {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin-top: 14px;
    color: var(--text-secondary, #94a3b8);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bayi-link:hover { color: var(--accent-success, #10b981); }
.bayi-link-sag { display: block; text-align: right; width: 100%; }

/* NOT: Şifre değiştirme modal'ının (.bs-*) ve titlebar 🔑 butonunun stilleri
   bilerek burada DEĞİL, bayi-sifre.js içinde tutulur — home.html ve
   faturalar.html bu dosyayı yüklemiyor, bileşen kendi stilini taşısın ki
   tek <script> satırıyla her sayfaya eklenebilsin. */

/* Katalog titlebar user area */
.bk-userbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
}
.bk-userbar .cikis {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.bk-userbar .cikis:hover { background: rgba(255,255,255,.3); }

/* Marka logosu — giriş / şifre yenileme ekranı. MicroFrucht logosu yeşil;
   login.css'teki beyaza boyama filtresini kaldırıp açık zemin üstünde gösteriyoruz. */
.brand-mark-light,
.brand-mark-light:hover { background: #fff; border-color: rgba(255,255,255,.9); }
.brand-logo-mf { filter: none; height: 60px; }
@media (max-width: 540px) { .brand-logo-mf { height: 48px; } }

/* Dil seçici — giriş ekranı (index.html) */
.bayi-lang-switch { position: fixed; top: 14px; right: 16px; z-index: 50; display: flex; gap: 6px; }

/* ── Mobil ────────────────────────────────────────────────────────
   Giriş ekranı 1024px altında tek kolona iner ve marka paneli yukarı
   gelir; dil seçici sabit kalırsa logonun üstüne biniyor. Akışa alıp
   sağa yaslıyoruz. */
@media (max-width: 1024px) {
    .bayi-lang-switch {
        position: static;
        justify-content: flex-end;
        padding: 12px 16px 0;
    }
}

@media (max-width: 540px) {
    .bayi-tabs button { padding: 13px 8px; font-size: 13.5px; min-height: 46px; }
    .bayi-msg { font-size: 12.5px; }
    /* 16px altındaki input'lara odaklanınca iOS Safari sayfayı zoom'lar */
    .form-card input { font-size: 16px; }
    .form-card .btn-submit { min-height: 48px; }
}

html.bp-no-sepet-ekle .hp-ekle { display: none !important; }

/* Salt okunur oturum — yazma kontrollerini gizle (API zaten 403) */
html.bp-readonly .bk-art,
html.bp-readonly .bk-stepper,
html.bp-readonly .bk-gonder,
html.bp-readonly .bk-bosalt,
html.bp-readonly .bk-taslak,
html.bp-readonly .hp-ekle,
html.bp-readonly #newCart,
html.bp-readonly #save,
html.bp-readonly #copy,
html.bp-readonly #template,
html.bp-readonly #close,
html.bp-readonly #checkout,
html.bp-readonly #newReturn,
html.bp-readonly .iconbtn,
html.bp-readonly .send,
html.bp-readonly .cancel {
    display: none !important;
}
html.bp-readonly .qty,
html.bp-readonly .sk-mik,
html.bp-readonly .sk-birim-sec {
    pointer-events: none;
    opacity: 0.7;
}
