/* ============================================================
   THEME "DUKA LA MFANO": muundo mpya mweupe/mwanga ulioidhinishwa
   (badala ya mstari wa rangi thabiti ya kijani ya temu za awali).
   Variables tu + marekebisho machache ya muundo yanayohitajika kwa
   mwonekano huu (sidebar/topbar nyeupe, kadi za stats zenye icon
   badge, chati). Muundo wa msingi (body.theme-skin) unabaki vilevile.
   ============================================================ */
body.theme-duka {
    --sidebar-bg: #ffffff;
    --sidebar-bg-2: #ffffff;
    --sidebar-text: #51607a;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --gray: #64748b;
    --mw-page: #f6f8fa;
    --mw-card: #ffffff;
    --mw-card-line: #e7eaf0;
    --mw-ink: #1a2333;
    --mw-ink-soft: #5b6679;
    --mw-muted: #8993a4;
    --mw-hover: rgba(16,185,129,.08);
    --mw-soft: #edfcf5;
    --top-ink: #1a2333;
    --chip: #ffffff;
    --chip-line: #e7eaf0;
    --chip-ink: #42506a;
}

/* ---- Sidebar: nyeupe, maandishi meusi, "pill" ya kijani ikiwa active ---- */
body.theme-duka .sidebar { background: #ffffff; border-right: 1px solid var(--mw-card-line); box-shadow: 2px 0 10px rgba(16,24,40,.03); }
body.theme-duka .sidebar-item, body.theme-duka .sidebar-subitem, body.theme-duka .sidebar-group-toggle { color: var(--sidebar-text); }
body.theme-duka .sidebar-item, body.theme-duka .sidebar-group-toggle { border-radius: 10px; margin: 2px 10px; padding: 10px 13px; font-weight: 600; }
body.theme-duka .sidebar-item:hover, body.theme-duka .sidebar-subitem:hover, body.theme-duka .sidebar-group-toggle:hover { background: var(--mw-hover); color: var(--accent-dark); }
body.theme-duka .sidebar-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,.28); }
body.theme-duka .sidebar-item.active i { color: #fff; }
body.theme-duka .sidebar-group-toggle.active { background: var(--mw-soft); color: var(--accent-dark); box-shadow: none; }
body.theme-duka .sidebar-group-toggle.active i, body.theme-duka .sidebar-group-toggle.active .sidebar-caret { color: var(--accent-dark); }
body.theme-duka .sidebar-item i, body.theme-duka .sidebar-group-toggle i { color: #8993a4; width: 18px; text-align: center; }
body.theme-duka .sidebar-item:hover i, body.theme-duka .sidebar-group-toggle:hover i { color: var(--accent-dark); }
body.theme-duka .sidebar-caret { color: #a7b0c0; }
body.theme-duka .sidebar-subitem.active { background: var(--mw-soft); color: var(--accent-dark); font-weight: 700; }
body.theme-duka .sidebar-divider { color: #a7b0c0; }
body.theme-duka .sidebar-collapse-btn { background: var(--mw-page); border-color: var(--mw-card-line); color: var(--mw-ink-soft); }
body.theme-duka .sidebar-collapse-btn:hover { background: var(--mw-soft); }

/* ---- Topbar: nyeupe, chip za nje zenye mpaka mwepesi ---- */
body.theme-duka .topbar { background: #ffffff; border-bottom: 1px solid var(--mw-card-line); box-shadow: 0 2px 10px rgba(16,24,40,.03); color: var(--top-ink); min-height: 66px; }
body.theme-duka .topbar-left { background: transparent !important; margin: 0 !important; padding: 0 18px !important; }
body.theme-duka .topbar-left .topbar-brand { color: var(--mw-ink); font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 10px; }
body.theme-duka .topbar-left .topbar-brand::before { content: "\f07a"; font-family: FontAwesome; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 15px; }
body.theme-duka .tb-search { background: var(--mw-page); border: 1px solid var(--mw-card-line); border-radius: 12px; }
body.theme-duka .tb-search input { background: transparent; color: var(--mw-ink); }
body.theme-duka .tb-search input::placeholder { color: var(--mw-muted); }
body.theme-duka .tb-search > i.fa-search { color: var(--mw-muted); }
body.theme-duka .tb-btn, body.theme-duka .tb-flag, body.theme-duka .tb-bell, body.theme-duka .tb-theme { background: var(--chip); border: 1px solid var(--chip-line); color: var(--chip-ink); }
body.theme-duka .tb-btn:hover, body.theme-duka .tb-flag:hover, body.theme-duka .tb-bell:hover, body.theme-duka .tb-theme:hover { background: var(--mw-soft); color: var(--accent-dark); }
body.theme-duka .tb-pos { background: var(--accent); color: #fff; border-color: var(--accent); }
body.theme-duka .tb-pos:hover { background: var(--accent-dark); }
body.theme-duka .tb-dt { background: var(--chip); border: 1px solid var(--chip-line); color: var(--chip-ink); }
body.theme-duka .tb-dt b { color: var(--mw-ink); }
body.theme-duka .tb-avatar { background: var(--accent); color: #fff; }
body.theme-duka .tb-name { color: var(--mw-ink); }
body.theme-duka .tb-role { color: var(--mw-muted); }

/* ---- Dashboard "duka-mfano": kadi za stats zenye icon badge ---- */
body.theme-duka .dm-stat { background: var(--mw-card); border: 1px solid var(--mw-card-line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(16,24,40,.04); display: flex; align-items: center; gap: 14px; }
body.theme-duka .dm-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 auto; }
body.theme-duka .dm-stat-icon.g { background: var(--mw-soft); color: var(--accent); }
body.theme-duka .dm-stat-icon.b { background: #eaf1fe; color: #3b82f6; }
body.theme-duka .dm-stat-icon.o { background: #fdf1e3; color: #e8912b; }
body.theme-duka .dm-stat-icon.r { background: #fdecec; color: #ef4444; }
body.theme-duka .dm-stat-label { color: var(--mw-ink-soft); font-size: 13px; font-weight: 600; }
body.theme-duka .dm-stat-value { font-size: 21px; font-weight: 800; color: var(--mw-ink); margin-top: 2px; }
body.theme-duka .dm-stat-value.r { color: var(--danger); }
body.theme-duka .dm-stat-sub { font-size: 12px; color: var(--mw-muted); margin-top: 2px; }
body.theme-duka .dm-stat-trend { font-size: 12px; font-weight: 700; }
body.theme-duka .dm-stat-trend.up { color: var(--accent-dark); }
body.theme-duka .dm-stat-trend.down { color: var(--danger); }

body.theme-duka .dm-card { background: var(--mw-card); border: 1px solid var(--mw-card-line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(16,24,40,.04); }
body.theme-duka .dm-card-title { font-size: 15px; font-weight: 800; color: var(--mw-ink); }
body.theme-duka .dm-card-sub { font-size: 12.5px; color: var(--mw-muted); margin-top: 2px; }
body.theme-duka .dm-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
body.theme-duka .dm-link { color: var(--accent-dark); font-size: 12.5px; font-weight: 700; text-decoration: none; }
body.theme-duka .dm-link:hover { text-decoration: underline; }

body.theme-duka .dm-mini-card { background: var(--mw-card); border: 1px solid var(--mw-card-line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(16,24,40,.04); display: flex; flex-direction: column; gap: 6px; }
body.theme-duka .dm-mini-top { display: flex; align-items: center; gap: 10px; }
body.theme-duka .dm-mini-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
body.theme-duka .dm-mini-label { font-size: 12.5px; color: var(--mw-ink-soft); font-weight: 600; }
body.theme-duka .dm-mini-value { font-size: 19px; font-weight: 800; color: var(--mw-ink); }
body.theme-duka .dm-mini-chart { height: 38px; margin-top: 2px; }

body.theme-duka .dm-stock-row, body.theme-duka .dm-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--mw-card-line); font-size: 13px; }
body.theme-duka .dm-top-row > span:first-child { flex: 0 0 18px; }
body.theme-duka .dm-top-row > span:nth-child(3) { flex: 0 0 32px; text-align: right; }
body.theme-duka .dm-top-row > span:last-child { flex: 0 0 72px; text-align: right; }
body.theme-duka .dm-stock-row:last-child, body.theme-duka .dm-top-row:last-child { border-bottom: none; }
body.theme-duka .dm-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 9px; flex: 0 0 auto; }
body.theme-duka .dm-dot.crit { background: var(--danger); }
body.theme-duka .dm-dot.warn { background: var(--amber); }
body.theme-duka .dm-head-row { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--mw-muted); padding-bottom: 8px; border-bottom: 1px solid var(--mw-card-line); margin-bottom: 4px; }
body.theme-duka .dm-head-row.cols4 > span:first-child { flex: 0 0 18px; }
body.theme-duka .dm-head-row.cols4 > span:nth-child(2) { flex: 1; }
body.theme-duka .dm-head-row.cols4 > span:nth-child(3) { flex: 0 0 32px; text-align: right; }
body.theme-duka .dm-head-row.cols4 > span:last-child { flex: 0 0 72px; text-align: right; }

body.theme-duka .dm-events { list-style: none; margin: 0; padding: 0; }
body.theme-duka .dm-event { display: flex; gap: 10px; padding: 9px 0; font-size: 13px; }
body.theme-duka .dm-event-time { color: var(--mw-muted); font-size: 11.5px; width: 44px; flex: 0 0 auto; padding-top: 2px; }
body.theme-duka .dm-event-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
body.theme-duka .dm-event-dot.sale { background: var(--accent); }
body.theme-duka .dm-event-dot.debt { background: var(--amber); }
body.theme-duka .dm-event-dot.stock { background: var(--danger); }
body.theme-duka .dm-event-text { color: var(--mw-ink); }

body.theme-duka .dm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
body.theme-duka .dm-badge.paid { background: var(--mw-soft); color: var(--accent-dark); }
body.theme-duka .dm-badge.debt { background: #fdecec; color: var(--danger); }
body.theme-duka .dm-badge.partial { background: #fdf1e3; color: var(--amber-dark); }

body.theme-duka .stock-badge.in { background: var(--mw-soft); color: var(--accent-dark); }
body.theme-duka .stock-badge.low { background: #fdf1e3; color: var(--amber-dark); }
body.theme-duka .stock-badge.out { background: #fdecec; color: var(--danger); }
body.theme-duka .icon-btn { background: #fff; border-color: var(--mw-card-line); color: var(--mw-ink-soft); }
body.theme-duka .icon-btn:hover { background: var(--mw-soft); color: var(--accent-dark); }
body.theme-duka .icon-btn.danger:hover { background: #fdecec; color: var(--danger); }
body.theme-duka .pt-toolbar, body.theme-duka .list-toolbar { background: var(--mw-card); border-color: var(--mw-card-line); }

body.theme-duka .dm-donut-wrap { display: flex; align-items: center; gap: 16px; }
body.theme-duka .dm-donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
body.theme-duka .dm-donut-legend-item { display: flex; align-items: center; gap: 6px; color: var(--mw-ink-soft); }
body.theme-duka .dm-donut-legend-dot { width: 9px; height: 9px; border-radius: 50%; }
body.theme-duka .dm-donut-legend-val { font-weight: 800; color: var(--mw-ink); margin-left: auto; }

body.theme-duka .dm-greet { font-size: 26px; font-weight: 800; color: var(--mw-ink); }
body.theme-duka .dm-greet-sub { color: var(--mw-ink-soft); font-size: 13.5px; margin-top: 2px; }
