/* ==========================================================================
   Bi Teslimat - Marka Teması (Bootstrap 5 üzerine)
   Renkler: Sarı (#F5B301) + Siyah (#16171A)
   ========================================================================== */

:root {
    --bt-yellow: #f5b301;
    --bt-yellow-dark: #d99e00;
    --bt-yellow-light: #ffd54a;
    --bt-black: #16171a;
    --bt-dark: #202124;
    --bt-gray: #6b7280;
    --bt-bg: #f4f5f7;
    --bt-radius: 14px;
    --bt-shadow: 0 6px 24px rgba(16, 17, 20, 0.08);
    --bt-shadow-sm: 0 2px 10px rgba(16, 17, 20, 0.06);

    /* Bootstrap override */
    --bs-primary: #f5b301;
    --bs-primary-rgb: 245, 179, 1;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bt-bg);
    color: #1f2933;
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Renk yardımcıları ---------- */
.text-brand { color: var(--bt-yellow) !important; }
.bg-brand { background-color: var(--bt-yellow) !important; }
.bg-ink { background-color: var(--bt-black) !important; }
.text-ink { color: var(--bt-black) !important; }

a { text-decoration: none; }

/* ---------- Butonlar ---------- */
.btn-brand {
    background-color: var(--bt-yellow);
    border-color: var(--bt-yellow);
    color: #16171a;
    font-weight: 600;
}
.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--bt-yellow-dark);
    border-color: var(--bt-yellow-dark);
    color: #16171a;
}
.btn-outline-brand {
    border-color: var(--bt-yellow);
    color: #b27c00;
    font-weight: 600;
}
.btn-outline-brand:hover {
    background-color: var(--bt-yellow);
    color: #16171a;
}
.btn-ink {
    background-color: var(--bt-black);
    border-color: var(--bt-black);
    color: #fff;
    font-weight: 600;
}
.btn-ink:hover {
    background-color: #000;
    color: var(--bt-yellow);
}
.btn { border-radius: 10px; }
.btn-lg { border-radius: 12px; }

/* ---------- Kartlar ---------- */
.card {
    border: none;
    border-radius: var(--bt-radius);
    box-shadow: var(--bt-shadow-sm);
}
.card.card-flat { box-shadow: none; border: 1px solid #ececf0; }

.form-control, .form-select {
    border-radius: 10px;
    padding: .6rem .85rem;
    border-color: #e2e4ea;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bt-yellow);
    box-shadow: 0 0 0 .2rem rgba(245, 179, 1, .2);
}
.form-label { font-weight: 600; font-size: .9rem; color: #374151; }

.badge-soft-success { background:#e7f7 ef; color:#0f7b46; }

/* ===================== AUTH / GUEST ===================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
}
.auth-side {
    background: linear-gradient(160deg, #16171a 0%, #2a2b30 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.auth-side .figuran {
    position: absolute;
    bottom: 0;
    right: 0;
    max-height: 80%;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,.4));
}
.auth-card {
    width: 100%;
    max-width: 460px;
}

/* ===================== MÜŞTERİ / KURYE MOBİL ===================== */
.mobile-shell {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bt-bg);
    position: relative;
    padding-bottom: 86px;
    box-shadow: 0 0 40px rgba(0,0,0,.05);
}
.mobile-topbar {
    background: var(--bt-black);
    color: #fff;
    padding: 14px 18px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-topbar .brand-logo { height: 30px; }

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-top: 1px solid #eceef2;
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    z-index: 1030;
    box-shadow: 0 -4px 20px rgba(0,0,0,.05);
}
.bottom-nav a {
    flex: 1;
    text-align: center;
    color: #9aa0aa;
    font-size: .68rem;
    font-weight: 600;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.bottom-nav a i { font-size: 1.35rem; }
.bottom-nav a.active { color: var(--bt-yellow-dark); }
.bottom-nav a.fab {
    flex: 0 0 auto;
    margin-top: -28px;
}
.bottom-nav a.fab .fab-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bt-yellow);
    color: #16171a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(245,179,1,.5);
}
.bottom-nav a.fab .fab-circle i { font-size: 1.6rem; }

.mobile-content { padding: 16px; }

/* Hero/arama */
.search-box {
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--bt-shadow-sm);
}
.search-box input { border: none; outline: none; flex: 1; background: transparent; }

.section-title { font-weight: 700; font-size: 1.05rem; margin: 18px 0 10px; }

/* Kurye kartı */
.courier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: var(--bt-shadow-sm);
    margin-bottom: 10px;
}
.courier-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--bt-black); color: var(--bt-yellow);
    display:flex;align-items:center;justify-content:center;
    font-weight:700; font-size:1.1rem; flex:0 0 auto;
}
.status-dot { width:10px;height:10px;border-radius:50%;display:inline-block; }
.status-online { background:#22c55e; }
.status-offline { background:#cbd5e1; }

/* Harita */
#map, .leaflet-map { width: 100%; border-radius: 14px; }

/* ===================== İŞLETME DASHBOARD ===================== */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
    width: 256px;
    background: var(--bt-black);
    color: #cdd0d6;
    flex: 0 0 auto;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    z-index: 1040;
    transition: transform .25s ease;
}
.dash-sidebar .brand { padding: 6px 10px 18px; }
.dash-sidebar .brand img { height: 34px; }
.dash-sidebar .nav-link {
    color: #b9bcc4;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 3px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-sidebar .nav-link i { font-size: 1.15rem; }
.dash-sidebar .nav-link:hover { background: #26282d; color: #fff; }
.dash-sidebar .nav-link.active {
    background: var(--bt-yellow);
    color: #16171a;
    font-weight: 700;
}
.dash-sidebar .nav-section {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
    color: #6b6e76; padding: 16px 14px 6px; font-weight: 700;
}

.dash-main {
    flex: 1;
    margin-left: 256px;
    min-width: 0;
}
.dash-topbar {
    background: #fff;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--bt-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.dash-content { padding: 24px; }

.stat-card {
    background: #fff;
    border-radius: var(--bt-radius);
    padding: 20px;
    box-shadow: var(--bt-shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .icon {
    width: 52px; height: 52px; border-radius: 12px;
    display:flex;align-items:center;justify-content:center;font-size:1.5rem;
}
.stat-card .icon.yellow { background:#fff3cf; color:#b27c00; }
.stat-card .icon.green { background:#dcfce7; color:#15803d; }
.stat-card .icon.blue { background:#dbeafe; color:#1d4ed8; }
.stat-card .icon.gray { background:#eef0f3; color:#475569; }
.stat-card .value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-card .label { color: #8a909a; font-size: .85rem; }

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1035;
}

/* Sipariş durum rozetleri */
.status-pill { font-size:.72rem; font-weight:700; padding:.35em .7em; border-radius:999px; }
.status-pending  { background:#fef3c7; color:#92600a; }
.status-accepted { background:#dbeafe; color:#1e40af; }
.status-picked   { background:#e0e7ff; color:#3730a3; }
.status-delivered{ background:#dcfce7; color:#166534; }
.status-cancelled{ background:#fee2e2; color:#991b1b; }

/* ürün kartı */
.product-thumb { width:56px;height:56px;border-radius:10px;object-fit:cover;background:#eee; }

@media (max-width: 991.98px) {
    .dash-sidebar { transform: translateX(-100%); }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; }
}

/* yardımcılar */
.cursor-pointer { cursor: pointer; }
.text-muted-2 { color:#9aa0aa; }
.divider { height:1px; background:#ececf0; margin:14px 0; }
.empty-state { text-align:center; padding:48px 20px; color:#9aa0aa; }
.empty-state i { font-size:2.5rem; opacity:.5; }

/* ===================== KATEGORİ SIDEBAR (sahibinden tarzı) ===================== */
.cat-side {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--bt-shadow-sm);
    overflow: hidden;
    border: 1px solid #ececf0;
}
.cat-side-head {
    background: var(--bt-black);
    color: #fff;
    font-weight: 700;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.cat-side-head i { color: var(--bt-yellow); }
.btn-close-cat {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
}
.cat-side-body { padding: 6px; }

.cat-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-radius: 10px;
    color: #1f2933;
    font-weight: 700;
    margin-bottom: 4px;
}
.cat-all i:first-child { color: var(--bt-yellow-dark); margin-right: 8px; }
.cat-all:hover { background: #f6f7f9; color: #16171a; }
.cat-all.active { background: var(--bt-yellow); color: #16171a; }

.cat-group { border-radius: 10px; }
.cat-group + .cat-group { border-top: 1px solid #f1f2f5; }
.cat-group-toggle {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    font-weight: 700;
    color: #16171a;
    border-radius: 10px;
}
.cat-group-toggle:hover { background: #f6f7f9; }
.cat-group-label { flex: 1; display: flex; align-items: center; gap: 10px; }
.cat-group-label i { color: var(--bt-yellow-dark); font-size: 1.05rem; }
.cat-caret { transition: transform .25s; color: #9aa0aa; font-size: .9rem; }
.cat-group-toggle[aria-expanded="true"] .cat-caret { transform: rotate(180deg); }
.cat-badge {
    font-size: .62rem; font-weight: 800; letter-spacing: .03em;
    background: #fff3cf; color: #b27c00;
    padding: .2em .55em; border-radius: 999px; text-transform: uppercase;
}

.cat-list { list-style: none; margin: 0; padding: 0 0 6px; }
.cat-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 22px;
    color: #4b5563;
    font-size: .92rem;
    border-radius: 8px;
}
.cat-list a i { font-size: 1rem; color: #9aa0aa; flex: 0 0 auto; }
.cat-list a:hover { background: #f6f7f9; color: #16171a; }
.cat-list a:hover i { color: var(--bt-yellow-dark); }
.cat-list a.active { background: var(--bt-yellow); color: #16171a; font-weight: 700; }
.cat-list a.active i { color: #16171a; }
.cat-count {
    font-size: .72rem; font-weight: 700; color: #6b7280;
    background: #eef0f3; padding: .1em .5em; border-radius: 999px; flex: 0 0 auto;
}
.cat-go { color: var(--bt-yellow-dark) !important; font-size: 1.2rem !important; }

/* Sticky masaüstü */
@media (min-width: 992px) {
    .cat-side.sticky-side { position: sticky; top: 88px; }
}

/* Mobil: kayan panel (offcanvas) */
@media (max-width: 991.98px) {
    .cat-side.cat-drawer {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        width: 86%; max-width: 340px;
        z-index: 1060;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform .28s ease;
        overflow-y: auto;
        box-shadow: 0 0 40px rgba(0,0,0,.3);
    }
    .cat-side.cat-drawer.open { transform: translateX(0); }
}
.cat-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1055;
}
.cat-backdrop.show { display: block; }

/* Kategori açma butonu (mobil) */
.cat-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    color: #16171a;
    box-shadow: var(--bt-shadow-sm);
}
.cat-trigger i { color: var(--bt-yellow-dark); }

/* ===================== ÇÖZÜM MERKEZİ (destek) ===================== */
.support-thread { display: flex; flex-direction: column; gap: 10px; }
.support-bubble {
    max-width: 88%;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: var(--bt-shadow-sm);
    font-size: .92rem;
    line-height: 1.45;
}
.support-bubble.mine {
    align-self: flex-end;
    background: var(--bt-yellow);
    color: #16171a;
    border-bottom-right-radius: 4px;
}
.support-bubble.staff {
    align-self: flex-start;
    background: #fff;
    color: #1f2933;
    border-bottom-left-radius: 4px;
    border: 1px solid #ececf0;
}
.support-meta {
    font-size: .72rem;
    opacity: .7;
    margin-bottom: 4px;
    font-weight: 600;
}

/* Hizmet kutucukları (fonksiyonel grid) */
.svc-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 16px;
    padding: 16px;
    height: 100%;
    color: #16171a;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.svc-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--bt-shadow);
    border-color: var(--bt-yellow);
    color: #16171a;
}
.svc-tile .svc-ic {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; background: #fff3cf; color: #b27c00;
}
.svc-tile.svc-courier .svc-ic { background: #e0f2fe; color: #0369a1; }
.svc-tile .svc-title { font-weight: 700; line-height: 1.2; }
.svc-tile .svc-sub { font-size: .8rem; color: #8a909a; }
