﻿/* Müşteri (bayi) paneli. Bootstrap 4 (sb-admin-2.min.css) üzerine çalışır.
   Renkler logodan: lacivert #303088, sarı #ffd200. */
:root {
    --m-ana: #303088;
    --m-ana-koyu: #23236a;
    --m-ana-acik: #ecedf8;
    --m-vurgu: #ffd200;
    --m-vurgu-koyu: #e0b800;
    --m-yan: #1d1e4f;
    --m-yan-yazi: #c9cbe6;
    --m-yan-soluk: #8587b5;
    --m-yan-genislik: 232px;
    --m-yan-dar: 68px;
    --m-ust: 60px;
    --m-alt: 62px;
    --m-zemin: #f4f5f9;
    --m-yazi: #2b2d42;
    --m-soluk: #6c7086;
    --m-cizgi: #e6e8f0;
    --m-yesil: #2b8a3e;
    --m-kirmizi: #c92a2a;
}

html, body { height: 100%; }
body.m-body {
    background: var(--m-zemin); color: var(--m-yazi);
    font-family: 'Nunito', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--m-ana); }
a:hover { color: var(--m-ana-koyu); }

/* ---------- Kenar menü ---------- */
.m-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040; width: var(--m-yan-genislik);
    background: var(--m-yan); color: var(--m-yan-yazi); display: flex; flex-direction: column;
    transition: width .2s ease, transform .25s ease;
}
.m-marka {
    height: var(--m-ust); display: flex; align-items: center; gap: 10px; padding: 0 16px; flex-shrink: 0;
    color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.07);
}
.m-marka:hover { color: #fff; text-decoration: none; }
.m-marka img { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; background: #fff; }
.m-marka-yazi { font-weight: 800; line-height: 1.15; white-space: nowrap; }
.m-marka-yazi small { display: block; font-weight: 600; font-size: 11px; color: var(--m-yan-soluk); }

.m-menu { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px; }
.m-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; min-height: 42px;
    border-radius: 9px; color: var(--m-yan-yazi); text-decoration: none; font-size: 14.5px; font-weight: 600;
    white-space: nowrap; position: relative;
}
.m-link i { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.m-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.m-link.aktif { background: rgba(255,255,255,.1); color: #fff; }
.m-link.aktif::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--m-vurgu); }
.m-link.aktif i { color: var(--m-vurgu); }
.m-side-alt { border-top: 1px solid rgba(255,255,255,.07); padding: 10px; flex-shrink: 0; }
.m-side-alt .m-link { font-size: 13.5px; }

body.m-dar .m-side { width: var(--m-yan-dar); }
body.m-dar .m-marka { padding: 0 15px; }
body.m-dar .m-marka-yazi, body.m-dar .m-link span { display: none; }
body.m-dar .m-link { justify-content: center; padding: 10px 0; }

/* ---------- Ana alan ---------- */
.m-ana { margin-left: var(--m-yan-genislik); min-height: 100%; display: flex; flex-direction: column; transition: margin-left .2s ease; }
body.m-dar .m-ana { margin-left: var(--m-yan-dar); }

.m-ust {
    position: sticky; top: 0; z-index: 1020; height: var(--m-ust); background: #fff;
    display: flex; align-items: center; gap: 8px; padding: 0 16px;
    box-shadow: 0 1px 0 var(--m-cizgi), 0 2px 10px rgba(30,32,80,.04);
}
.m-ust-dugme {
    border: 0; background: transparent; width: 40px; height: 40px; border-radius: 10px; color: #4a4d68;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; font-size: 17px;
}
.m-ust-dugme:hover, .m-ust-dugme:focus { background: #f1f2f8; outline: none; color: var(--m-ana); text-decoration: none; }
.m-sayfa { font-size: 17px; font-weight: 800; color: var(--m-yazi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.m-sag { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.m-bakiye {
    display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; padding: 4px 12px;
    border-radius: 10px; background: var(--m-ana-acik); text-decoration: none !important; white-space: nowrap;
}
.m-bakiye .e { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--m-soluk); }
.m-bakiye .d { font-size: 14.5px; font-weight: 800; color: var(--m-ana); font-variant-numeric: tabular-nums; }

.m-rozet {
    position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--m-vurgu); color: #1d1e4f; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.m-rozet:empty, .m-rozet[data-sayi="0"] { display: none; }

.m-sepet-liste { width: 320px; max-width: calc(100vw - 24px); padding: 0; }
.m-sepet-liste .baslik { padding: 12px 14px; font-weight: 800; border-bottom: 1px solid var(--m-cizgi); }
.m-sepet-liste .urunler { max-height: 320px; overflow-y: auto; }
.m-sepet-urun { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #f3f4f8; font-size: 13px; }
.m-sepet-urun .ad { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-sepet-urun .adet { font-weight: 800; color: var(--m-ana); white-space: nowrap; }
.m-sepet-liste .bos { padding: 22px 14px; text-align: center; color: var(--m-soluk); font-size: 13px; }
.m-sepet-liste .alt { padding: 10px 14px; }

.m-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--m-ana); color: #fff; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.m-kullanici .dropdown-toggle::after { display: none; }
.m-kullanici .dropdown-menu { min-width: 230px; }
.m-kullanici-ad { font-weight: 700; font-size: 13px; color: var(--m-yazi); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.m-icerik { flex: 1; padding: 22px 24px 28px; max-width: 1400px; width: 100%; }

/* ---------- Sayfa başlıkları (sayfalardaki eski h1'ler tek tipe) ---------- */
.m-icerik > .container-fluid, .m-icerik .container-fluid { padding-left: 0; padding-right: 0; }
.m-icerik h1.h3, .m-icerik .container-fluid > h1 {
    font-size: 22px !important; font-weight: 800; color: var(--m-yazi) !important; margin: 0 0 16px !important;
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-family: inherit;
}
.m-icerik h1.h3 span, .m-icerik .container-fluid > h1 span { font-size: 12.5px !important; font-weight: 600; color: var(--m-soluk) !important; }
.m-icerik > .container-fluid > hr:first-of-type { display: none; }
.m-baslik { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
.m-baslik h1 { font-size: 22px; font-weight: 800; margin: 0; color: var(--m-yazi); }
.m-baslik .alt { font-size: 12.5px; color: var(--m-soluk); font-weight: 600; }
.m-baslik .sag { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Kart, form, düğme ---------- */
.m-icerik .card { border: 0 !important; border-radius: 14px; box-shadow: 0 1px 3px rgba(30,32,80,.06), 0 6px 18px rgba(30,32,80,.03) !important; }
.m-icerik .card-header { background: #fff; border-bottom: 1px solid #f1f2f7; border-radius: 14px 14px 0 0 !important; font-weight: 800; }
.m-icerik .shadow { box-shadow: 0 1px 3px rgba(30,32,80,.06), 0 6px 18px rgba(30,32,80,.03) !important; }
.m-icerik label { font-size: 12.5px; font-weight: 700; color: #4a4d68; margin-bottom: 4px; }
.m-icerik .form-control { border-radius: 9px; border-color: #dcdfea; color: var(--m-yazi); font-size: 14px; }
.m-icerik .form-control-sm { height: calc(1.5em + .75rem + 2px); padding: .375rem .75rem; font-size: 14px; }
.form-control:focus { border-color: #8d8fd0; box-shadow: 0 0 0 .2rem rgba(48,48,136,.14); }
.form-control::placeholder { color: #9a9db3; }

.btn { border-radius: 9px; font-weight: 700; }
.btn-primary { background: var(--m-ana) !important; border-color: var(--m-ana) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--m-ana-koyu) !important; border-color: var(--m-ana-koyu) !important; }
.btn-success { background: var(--m-yesil); border-color: var(--m-yesil); }
.btn-warning { background: var(--m-vurgu); border-color: var(--m-vurgu); color: #1d1e4f !important; }
.btn-warning:hover { background: var(--m-vurgu-koyu); border-color: var(--m-vurgu-koyu); }
.btn-vurgu { background: var(--m-vurgu); border-color: var(--m-vurgu); color: #1d1e4f; }
.btn-vurgu:hover, .btn-vurgu:focus { background: var(--m-vurgu-koyu); border-color: var(--m-vurgu-koyu); color: #1d1e4f; }
.btn-hafif { background: var(--m-ana-acik); border-color: var(--m-ana-acik); color: var(--m-ana); }
.btn-hafif:hover { background: #dfe0f3; color: var(--m-ana-koyu); }
.text-primary { color: var(--m-ana) !important; }
.bg-primary { background-color: var(--m-ana) !important; }
.badge-primary { background: var(--m-ana); }

/* Tablolar */
.m-icerik .table { color: var(--m-yazi); }
.m-icerik .table thead th {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--m-soluk); font-weight: 800;
    border-top: 0; border-bottom: 1px solid var(--m-cizgi); white-space: nowrap; background: #fff;
}
.m-icerik .table td { vertical-align: middle; border-top-color: #f1f2f7; font-size: 13.5px; }
.m-icerik .table-bordered, .m-icerik .table-bordered td, .m-icerik .table-bordered th { border-color: #eef0f5; }
.m-icerik .table-striped tbody tr:nth-of-type(odd) { background: #fafbfd; }
.m-kaydir { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dataTables_wrapper { overflow-x: auto; }
.dataTables_info { font-size: 12px; color: var(--m-soluk); }

/* Durum rozetleri, boş durum, tutar */
.m-durum { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.m-durum.yesil { background: #ebfbee; color: var(--m-yesil); }
.m-durum.kirmizi { background: #fff5f5; color: var(--m-kirmizi); }
.m-durum.sari { background: #fff9db; color: #b07d00; }
.m-durum.mavi { background: var(--m-ana-acik); color: var(--m-ana); }
.m-durum.gri { background: #f1f3f5; color: #495057; }
.m-bos { text-align: center; padding: 40px 16px; color: var(--m-soluk); }
.m-bos i { font-size: 38px; color: #c8cbe0; display: block; margin-bottom: 10px; }
.m-tutar { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }

/* ---------- Liste sayfaları: filtre çubuğu, özet kutuları, telefonda karta dönüşen tablo ---------- */
.m-filtre { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.m-filtre .form-group { margin: 0; min-width: 150px; }
.m-filtre .sag { margin-left: auto; display: flex; gap: 8px; }
.m-ozet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
.m-ozet > div { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(30,32,80,.06); }
.m-ozet .e { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--m-soluk); }
.m-ozet .d { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m-ozet .d.kirmizi { color: var(--m-kirmizi); }
.m-ozet .d.yesil { color: var(--m-yesil); }
.m-liste-ust { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--m-soluk); font-weight: 700; margin: 6px 2px 8px; }
.m-tablo { width: 100%; }
.m-tablo th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--m-soluk); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--m-cizgi); white-space: nowrap; }
.m-tablo td { padding: 11px 12px; border-bottom: 1px solid #f1f2f7; font-size: 13.5px; vertical-align: middle; }
.m-tablo tbody tr:hover td { background: #fafbff; }
.m-tablo tfoot td { font-weight: 800; border-top: 2px solid var(--m-cizgi); border-bottom: 0; }
.m-tablo .sag, .m-tablo th.sag { text-align: right; }
.m-tablo .soluk { font-size: 12px; color: var(--m-soluk); }
@media (max-width: 767.98px) {
    .m-filtre .form-group { flex: 1 1 140px; min-width: 0; }
    .m-filtre .sag { margin-left: 0; flex: 1 1 100%; }
    .m-filtre .sag .btn { flex: 1; }
    .m-ozet { grid-template-columns: 1fr 1fr; gap: 8px; }
    .m-ozet > div:last-child { grid-column: 1 / -1; }
    .m-ozet .d { font-size: 16px; }
    .m-liste-kart { background: transparent !important; box-shadow: none !important; }
    .m-liste-kart > .card-body { padding: 0 !important; }
    .m-tablo-kart thead { display: none; }
    .m-tablo-kart, .m-tablo-kart tbody, .m-tablo-kart tfoot, .m-tablo-kart tr, .m-tablo-kart td { display: block; width: 100%; }
    .m-tablo-kart tbody tr, .m-tablo-kart tfoot tr { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(30,32,80,.06); margin-bottom: 10px; padding: 8px 14px; }
    .m-tablo-kart td { border: 0 !important; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .m-tablo-kart td[data-baslik]::before { content: attr(data-baslik); color: var(--m-soluk); font-size: 12px; font-weight: 700; text-align: left; flex-shrink: 0; }
    .m-tablo-kart td.bos-hucre { display: none; }
    .m-tablo-kart tbody tr:hover td { background: transparent; }
}

/* ---------- Bekleme göstergesi (eski #preloader / #preloader1 de buraya bağlanır) ---------- */
#preloader, #preloader1 {
    position: fixed !important; inset: 0; z-index: 1060 !important; background: rgba(244,245,249,.55) !important;
    display: flex !important; align-items: center; justify-content: center; width: auto !important; height: auto !important;
}
#preloader .loader, #preloader1 .loader { display: block !important; width: auto !important; height: auto !important; }
#preloader .loader-icon, #preloader1 .loader-icon {
    width: 44px !important; height: 44px !important; border: 4px solid var(--m-ana-acik) !important; border-top-color: var(--m-ana) !important;
    border-radius: 50%; animation: m-don .8s linear infinite !important;
}
@keyframes m-don { to { transform: rotate(360deg); } }

/* toastr: marka rengi */
#toast-container > .toast-success { background-color: var(--m-yesil); }
#toast-container > div { border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); opacity: 1; }

/* ---------- Telefon ---------- */
.m-perde, .m-alt { display: none; }

@media (max-width: 991.98px) {
    .m-icerik { padding: 18px 16px 24px; }
    .m-kullanici-ad { display: none; }
}

@media (max-width: 767.98px) {
    .m-side { transform: translateX(-100%); width: 280px; visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
    body.m-menu-acik .m-side { transform: translateX(0); visibility: visible; box-shadow: 4px 0 24px rgba(0,0,0,.3); transition: transform .25s ease; }
    body.m-dar .m-side { width: 280px; }
    body.m-dar .m-marka-yazi, body.m-dar .m-link span { display: initial; }
    body.m-dar .m-link { justify-content: flex-start; padding: 10px 12px; }
    body.m-menu-acik { overflow: hidden; }
    .m-perde { display: block; position: fixed; inset: 0; background: rgba(15,16,40,.45); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .2s; }
    body.m-menu-acik .m-perde { opacity: 1; pointer-events: auto; }
    .m-link { min-height: 46px; font-size: 15.5px; }

    .m-ana, body.m-dar .m-ana { margin-left: 0; padding-bottom: calc(var(--m-alt) + env(safe-area-inset-bottom)); }
    .m-ust { padding: 0 8px 0 4px; gap: 4px; height: 56px; }
    .m-sayfa { font-size: 16px; }
    .m-bakiye { padding: 3px 9px; }
    .m-bakiye .d { font-size: 13.5px; }
    .m-ust .m-sepet-dugme { display: none; }
    .m-icerik { padding: 14px 12px 20px; }
    .m-icerik h1.h3, .m-icerik .container-fluid > h1, .m-baslik h1 { font-size: 19px !important; }

    .m-alt {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        height: calc(var(--m-alt) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: #fff; border-top: 1px solid var(--m-cizgi); box-shadow: 0 -2px 12px rgba(30,32,80,.06);
    }
    .m-alt a, .m-alt button {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        font-size: 11px; font-weight: 700; color: #7a7d96; text-decoration: none; border: 0; background: transparent; padding: 0; position: relative;
    }
    .m-alt i { font-size: 19px; }
    .m-alt .aktif { color: var(--m-ana); }
    .m-alt .m-rozet { top: 5px; right: calc(50% - 22px); }

    /* Bootstrap ızgarası telefonda daha sıkı */
    .m-icerik .card-body { padding: 14px; }
}

@media (min-width: 768px) { .m-yalniz-telefon { display: none !important; } }
@media (max-width: 767.98px) { .m-yalniz-masaustu { display: none !important; } }
