/* BECOOL CMMS — ახალი განლაგება: მენიუ, ზედა ზოლი, გზა, აპინვა, ძებნა, ახალი გვერდები */
:root { --bc-side: 248px; }
body.bc-col { --bc-side: 60px; }
body { padding-left: var(--bc-side); transition: padding-left .15s; }
body > .container.mx-auto { max-width: none !important; padding: 16px 20px !important; margin: 0 !important; }
#_breadcrumb { display: none !important; }
#branch-view .flex.gap-1:has(#tab-overview) { display: none !important; }

#bc-side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--bc-side); z-index: 45; background: #FBFCFD; border-right: 1px solid #E2E7ED; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; overflow-y: auto; overflow-x: hidden; transition: width .15s; font-size: 13px; color: #334155; }
.bc-head { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 10px; margin-bottom: 6px; }
.bc-brand { flex: 1; font-weight: 700; font-size: 15px; letter-spacing: .2px; white-space: nowrap; color: #1E293B; }
.bc-brand span { color: #2563EB; font-weight: 500; }
.bc-iconbtn { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid #E2E7ED; border-radius: 6px; background: #fff; color: #64748B; cursor: pointer; }
.bc-iconbtn:hover { background: #F1F3F6; }
.bc-nv { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #334155; text-align: left; cursor: pointer; white-space: nowrap; font-size: 13px; }
.bc-nv:hover { background: #EEF1F5; }
.bc-nv.on { background: #E8EEF7; color: #1D4ED8; font-weight: 600; }
.bc-nv.dim { color: #94A3B8; }
.bc-nv svg { width: 18px; height: 18px; flex: none; stroke-width: 1.6; }
.bc-sub .bc-nv { height: 32px; padding-left: 38px; }
.bc-soon { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #F1F3F6; color: #94A3B8; font-weight: 500; }
.bc-caret { margin-left: auto; transition: transform .15s; }
.bc-sys-closed .bc-caret { transform: rotate(-90deg); }
.bc-sys-closed + .bc-sub { display: none; }
.bc-ctx { margin: 2px 4px 8px; padding: 8px 10px; border: 1px solid #DCE5F3; background: #F3F7FD; border-radius: 6px; display: flex; align-items: center; gap: 8px; }
.bc-ctx-av { width: 26px; height: 26px; border-radius: 6px; background: #DBEAFE; color: #1E40AF; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.bc-ctx-av img { width: 100%; height: 100%; object-fit: cover; }
.bc-ctx-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-ctx-x { margin-left: auto; border: 0; background: transparent; color: #94A3B8; font-size: 16px; cursor: pointer; }
.bc-pinh { margin: 14px 10px 4px; font-size: 12px; color: #94A3B8; display: flex; justify-content: space-between; }
.bc-pinempty { padding: 4px 10px; font-size: 12px; color: #94A3B8; }
body.bc-col .bc-lbl, body.bc-col .bc-soon, body.bc-col .bc-caret, body.bc-col .bc-sub, body.bc-col .bc-pinzone, body.bc-col .bc-ctx-txt, body.bc-col .bc-brand { display: none !important; }
body.bc-col .bc-head { padding: 0; justify-content: center; }
body.bc-col .bc-ctx { padding: 4px; justify-content: center; }

#bc-top { position: sticky; top: 0; z-index: 40; height: 50px; background: #fff; border-bottom: 1px solid #E2E7ED; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.bc-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid #E2E7ED; border-radius: 6px; background: #F8FAFB; color: #64748B; }
.bc-search input { flex: 1; border: 0; background: transparent; font-size: 13px; outline: none; min-width: 0; }
.bc-topbtn { position: relative; height: 34px; min-width: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #475569; font-size: 12px; cursor: pointer; }
.bc-topbtn:hover { background: #F1F3F6; }
.bc-topbtn.out { border-color: #E2E7ED; background: #fff; }
.bc-avatar { width: 30px; height: 30px; border-radius: 50%; background: #E2E8F0; color: #475569; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
#bc-crumbs { position: sticky; top: 50px; z-index: 39; min-height: 36px; background: #fff; border-bottom: 1px solid #E2E7ED; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 16px; font-size: 13px; }
#bc-crumbs button { border: 0; background: transparent; padding: 4px 6px; border-radius: 5px; color: #64748B; cursor: pointer; font-size: 13px; }
#bc-crumbs button:hover { background: #F1F3F6; color: #1E293B; }
#bc-crumbs button.last { color: #1E293B; font-weight: 600; }
#bc-crumbs .sep { color: #CBD5E1; }

.bc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.bc-toolbar input, .bc-toolbar select { height: 34px; border: 1px solid #E2E7ED; border-radius: 6px; background: #fff; padding: 0 10px; font-size: 13px; color: #334155; }
.bc-seg { display: flex; border: 1px solid #E2E7ED; border-radius: 6px; overflow: hidden; background: #fff; }
.bc-seg button { width: 34px; height: 32px; border: 0; background: #fff; color: #94A3B8; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bc-seg button.on { background: #EEF2F7; color: #1E293B; }
.bc-seg svg { width: 15px; height: 15px; }
.bc-addbtn { height: 34px; padding: 0 14px; border: 0; border-radius: 6px; background: #2563EB; color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.bc-addbtn:hover { background: #1D4ED8; }

.bc-pin { position: absolute; top: 14px; right: 16px; z-index: 5; width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bc-pin svg { width: 18px; height: 18px; }
#customers-list.bc-rows { display: flex !important; flex-direction: column; gap: 8px !important; }
#customers-list.bc-rows > div { display: flex; align-items: center; gap: 16px; padding: 10px 56px 10px 14px !important; border-radius: 10px !important; transform: none !important; }
#customers-list.bc-rows > div > .absolute:first-child { display: none; }
#customers-list.bc-rows > div > .flex.justify-between { margin: 0 !important; }
#customers-list.bc-rows > div > .flex.justify-between > div { width: 40px !important; height: 40px !important; border-width: 2px !important; border-radius: 8px !important; box-shadow: none !important; }
#customers-list.bc-rows h3 { font-size: 16px !important; margin: 0 !important; flex: 1 1 200px; }
#customers-list.bc-rows p { margin: 0 !important; flex: 1 1 200px; }
#customers-list.bc-rows > div > .flex.gap-4 { flex: none; }
#customers-list.bc-rows > div > .flex.gap-4 > button:first-child { padding: 8px 14px !important; flex: none; }
#customers-list.bc-rows .bc-pin { top: 50%; transform: translateY(-50%); right: 10px; }

#branches-list.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
#branches-list.bc-grid > div { flex-direction: column !important; margin: 0 !important; }
#branches-list.bc-grid > div > div:first-child { width: 100% !important; min-height: 150px !important; }

.bc-page-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.bc-page-h h2 { margin: 0; font-size: 20px; font-weight: 700; color: #1E293B; flex: 1; min-width: 200px; }
.bc-count { font-size: 14px; font-weight: 400; color: #64748B; }
.bc-soonbox { background: #fff; border: 1px dashed #CBD5E1; border-radius: 10px; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #64748B; text-align: center; padding: 24px; }
.bc-cal { background: #fff; border: 1px solid #E2E7ED; border-radius: 10px; overflow: hidden; }
.bc-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bc-cal-grid > div { min-height: 84px; padding: 6px 8px; border-right: 1px solid #F1F3F6; border-bottom: 1px solid #F1F3F6; font-size: 12px; color: #475569; }
.bc-cal-grid > div.out { background: #FAFBFC; color: #CBD5E1; }
.bc-cal-grid > div.today span { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #2563EB; color: #fff; }
.bc-cal-wd > div { min-height: 0; padding: 6px 8px; color: #64748B; border-right: 0; }
/* ── v2: მომხმარებლის ბარათი ცალკე გვერდზე; სხვაგან მხოლოდ ანალიტიკური ზოლი ── */
.bc-ctx { cursor: pointer; }
.bc-ctx:hover { border-color: #BFD3EE; }
.bc-ctx.on { border-color: #93B4E6; background: #E8EEF7; }
body:not(.bc-page-card) #bc-cust-card > div:first-child { display: none !important; }
body:not(.bc-page-card) #bc-cust-card > div:last-child { border-top: 0 !important; }
body.bc-page-card #branch-view > :not(#bc-cust-card) { display: none !important; }

/* ── v2: ფილიალის სათაურში ამინდი სიხშირის გვერდით ── */
#branch-dashboard-view > div:first-child > div:first-child { flex-wrap: wrap; }
#bdc-weather-strip { border-top: 0 !important; flex: 1 1 420px; justify-content: flex-end; overflow-x: auto; margin: 0 8px; }
#bdc-w-data { width: auto !important; }
#bdc-w-data > div { flex: 0 0 auto !important; min-width: 64px !important; padding: 2px 10px !important; }

/* ── v2: აპინვა ფილიალებზე, აგრეგატებზე, სერვისებზე ── */
#branches-list > div { position: relative; }
.av-card { position: relative; }
.bc-pin-inline { width: 30px; height: 28px; flex: none; border: 1px solid #E2E8F0; border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; vertical-align: middle; margin-left: 4px; }
.bc-pin-inline svg { width: 15px; height: 15px; }
.bc-pintype { width: 14px; height: 14px; flex: none; display: flex; color: #F59E0B; }

/* ── v2: აგრეგატების კატეგორიები — ჰორიზონტალური, ღია ფერის ზოლი ── */
#bdcp-assets .av-layout { grid-template-columns: 1fr !important; grid-template-rows: auto 1fr; min-height: 0 !important; overflow: visible !important; }
#bdcp-assets .av-sb { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px !important; background: #F8FAFC !important; border-bottom: 1px solid #E2E7ED; overflow: visible !important; border-radius: 1rem 1rem 0 0; }
#bdcp-assets .av-sb-header { padding: 0 10px 0 2px !important; border: 0 !important; margin-right: 4px; }
#bdcp-assets .av-sb-branch-name { color: #1E293B !important; }
#bdcp-assets .av-sb-sub { color: #64748B !important; }
#bdcp-assets .av-sb-section-label { display: none !important; }
#bdcp-assets .av-cat-wrap { position: relative; margin: 0 !important; }
#bdcp-assets .av-cat, #bdcp-assets .av-cat-wrap > .av-item { display: flex !important; align-items: center; gap: 6px; height: 32px; padding: 0 10px !important; border: 1px solid #E2E7ED; border-radius: 8px; background: #fff; color: #334155 !important; font-size: 12px !important; font-weight: 600 !important; white-space: nowrap; }
#bdcp-assets .av-cat:hover, #bdcp-assets .av-cat-wrap > .av-item:hover { background: #F1F5F9; }
#bdcp-assets .av-cat.open { border-color: #93C5FD; background: #EFF6FF; color: #1D4ED8 !important; }
#bdcp-assets .av-cat .av-arrow { transform: rotate(90deg); opacity: .6; margin-left: 2px; }
#bdcp-assets .av-cat.open + .av-sub { display: block !important; position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 200px; background: #fff; border: 1px solid #E2E7ED; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.08); padding: 4px; }
#bdcp-assets .av-sub .av-item { padding: 7px 10px !important; color: #334155 !important; font-size: 12px !important; border-radius: 6px; }
#bdcp-assets .av-sub .av-item:hover { background: #F1F5F9; }
#bdcp-assets .av-item.active { background: #E6F4EF !important; color: #0F766E !important; border-color: #9FD9C5 !important; }
#bdcp-assets .av-badge { background: #F1F5F9 !important; color: #64748B !important; font-size: 10px !important; margin-left: 6px !important; }
#bdcp-assets .av-item.active .av-badge { background: #CCEFE3 !important; color: #0F766E !important; }
#bc-pins svg { width: 14px !important; height: 14px !important; }
/* ── v3 (1): შეტყობინება ეკრანის ცენტრში ── */
#bc-toast { position: fixed; left: calc(var(--bc-side) + (100vw - var(--bc-side)) / 2); top: 38%; transform: translate(-50%, -50%); z-index: 200; display: none; align-items: center; gap: 12px; max-width: min(460px, 90vw); background: #fff; color: #1E293B; padding: 18px 24px; border: 1px solid #FCD34D; border-left: 5px solid #F59E0B; border-radius: 10px; font-size: 15px; font-weight: 600; box-shadow: 0 18px 50px rgba(15, 23, 42, .18); animation: bcToastIn .18s ease-out; }
#bc-toast svg { width: 22px; height: 22px; flex: none; stroke: #F59E0B; }
@keyframes bcToastIn { from { opacity: 0; transform: translate(-50%, -42%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ── v3 (3): არჩეული ფილიალი მენიუში, ფილიალების ქვეშ ── */
.bc-bctx { margin-left: 18px; }
body.bc-col .bc-bctx { margin-left: 4px; }

/* ── v3 (4): ფილიალის ★ „რედ.“ ღილაკის გვერდით (აღარ ფარავს მას) ── */
#branches-list .bc-pin-inline { margin-left: auto; margin-right: 8px; }

/* ── v3 (7): კატეგორიის არჩევა (მთელი ჯგუფი) ── */
#bdcp-assets .av-cat.bc-cat-on { border-color: #9FD9C5 !important; background: #E6F4EF !important; color: #0F766E !important; }

/* ── v4 (3): ლოგოზე დაჭერა → მომხმარებლები ── */
.bc-brand { cursor: pointer; }
/* ── v4 (5): აპინულები — 5 ხილული, მეტი რომ იყოს, სქროლი; მარჯვნივ მოხსნა ── */
#bc-pins { max-height: 180px; overflow-y: auto; overscroll-behavior: contain; }
#bc-pins .bc-nv { padding-right: 4px; }
.bc-unpin { margin-left: auto; flex: none; width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: #94A3B8; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bc-unpin:hover { background: #E2E8F0; color: #DC2626; }
/* ── v4 (4): ძებნა ყველგან ── */
.bc-search-wrap { position: relative; flex: 1; max-width: 460px; }
.bc-search-wrap .bc-search { max-width: none; }
.bc-sres { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid #E2E7ED; border-radius: 10px; box-shadow: 0 16px 40px rgba(15,23,42,.14); padding: 6px; }
.bc-sres-h { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: #94A3B8; }
.bc-sres-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.bc-sres-i:hover, .bc-sres-i.on { background: #EEF2F7; }
.bc-sres-i svg { width: 16px; height: 16px; flex: none; color: #64748B; }
.bc-sres-t { font-size: 13px; color: #1E293B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-sres-s { font-size: 11px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-sres-none { padding: 14px 10px; font-size: 13px; color: #94A3B8; text-align: center; }

/* ── v3 (2): გაერთიანებული გვერდი ── */
.bc-agg-box { background: #fff; border: 1px solid #E2E7ED; border-radius: 10px; overflow-x: auto; }
.bc-agg-box table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bc-agg-box th { text-align: left; font-weight: 500; color: #64748B; padding: 10px 12px; border-bottom: 1px solid #E2E7ED; background: #F8FAFC; white-space: nowrap; }
.bc-agg-box td { padding: 10px 12px; border-bottom: 1px solid #F1F3F6; color: #334155; white-space: nowrap; }
.bc-agg-box tbody tr { cursor: pointer; }
.bc-agg-box tbody tr:hover { background: #F8FAFC; }
.bc-agg-box tfoot td { font-weight: 700; color: #1E293B; background: #F8FAFC; border-bottom: 0; }
.bc-agg-box .num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-agg-empty { padding: 40px 16px; text-align: center; color: #94A3B8; font-size: 13px; }
.bc-agg-note { margin-bottom: 12px; padding: 10px 14px; border: 1px solid #DCE5F3; background: #F3F7FD; border-radius: 8px; font-size: 13px; color: #334155; }
.bc-st { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #F1F5F9; color: #64748B; }
.bc-st.ok { background: #DCFCE7; color: #166534; } .bc-st.mt { background: #FEF3C7; color: #92400E; } .bc-st.dn { background: #FEE2E2; color: #991B1B; }
.bc-agg-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bc-agg-kpis > div { background: #fff; border: 1px solid #E2E7ED; border-radius: 10px; padding: 12px 14px; }
.bc-agg-kpis b { display: block; font-size: 20px; color: #1E293B; }
.bc-agg-kpis span { font-size: 12px; color: #64748B; }