/* ==========================================================
   Nimba Markets — storefront + dashboards
   Palette: forest green (Nimba hills) + market-cloth gold
   ========================================================== */
:root {
  --forest: #1f4d3a;
  --forest-2: #163a2b;
  --leaf: #2e7d5b;
  --leaf-soft: #e3f0e8;
  --gold: #f2b705;
  --gold-soft: #fff4cf;
  --ink: #17201b;
  --muted: #5d6b63;
  --line: #dce3de;
  --paper: #f6f8f5;
  --white: #ffffff;
  --danger: #c0392b;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-primary: var(--forest);
  --bs-primary-rgb: 31, 77, 58;
  --bs-link-color: var(--leaf);
  --bs-link-color-rgb: 46, 125, 91;
  --bs-link-hover-color: var(--forest);
  --bs-border-color: var(--line);
}

body { font-family: var(--font-body); color: var(--ink); background: var(--paper); font-size: 1rem; line-height: 1.55; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .font-head { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
a { text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.text-muted { color: var(--muted) !important; }
.small-label { font-size: .85rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--forest); --bs-btn-border-color: var(--forest); --bs-btn-hover-bg: var(--forest-2); --bs-btn-hover-border-color: var(--forest-2); --bs-btn-active-bg: var(--forest-2); --bs-btn-disabled-bg: var(--forest); --bs-btn-disabled-border-color: var(--forest); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover, .btn-gold:focus { background: #dca600; border-color: #dca600; color: var(--ink); }
.btn-outline-primary { --bs-btn-color: var(--forest); --bs-btn-border-color: var(--forest); --bs-btn-hover-bg: var(--forest); --bs-btn-hover-border-color: var(--forest); --bs-btn-active-bg: var(--forest); }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; color: #fff; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--leaf); box-shadow: 0 0 0 .2rem rgba(46,125,91,.18); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }

/* ---------- Top strip + header ---------- */
.topstrip { background: var(--forest-2); color: #cfe0d6; font-size: .85rem; }
.topstrip a { color: #fff; }
.topstrip .cur-switch a { padding: .1rem .5rem; border-radius: 4px; color: #cfe0d6; }
.topstrip .cur-switch a.on { background: var(--gold); color: var(--ink); font-weight: 700; }

.site-header { background: var(--forest); color: #fff; position: sticky; top: 0; z-index: 1030; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: #fff; letter-spacing: -0.02em; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); display: grid; place-items: center; color: var(--forest); }
.brand-mark svg { width: 22px; height: 22px; }
.header-search { flex: 1; max-width: 640px; }
.header-search .form-control { border: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding: .65rem 1rem; }
.header-search .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.head-link { color: #fff; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .6rem; border-radius: var(--radius-sm); font-weight: 600; position: relative; }
.head-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.head-link .bi { font-size: 1.3rem; }
.cart-count { position: absolute; top: 0; left: 22px; background: var(--gold); color: var(--ink); font-size: .7rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.catbar .scroller { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.catbar .scroller::-webkit-scrollbar { display: none; }
.catbar a { color: var(--ink); white-space: nowrap; padding: .7rem .8rem; font-weight: 500; font-size: .93rem; border-bottom: 3px solid transparent; }
.catbar a:hover, .catbar a.active { color: var(--forest); border-bottom-color: var(--gold); }

/* ---------- The awning: market-stall stripe (signature element) ---------- */
.awning {
  height: 26px;
  background:
    radial-gradient(circle at 15px 0, transparent 14px, var(--paper) 15px) 0 12px / 30px 14px repeat-x,
    repeating-linear-gradient(90deg, var(--gold) 0 30px, var(--forest) 30px 60px);
}
.awning.on-white { background:
    radial-gradient(circle at 15px 0, transparent 14px, #fff 15px) 0 12px / 30px 14px repeat-x,
    repeating-linear-gradient(90deg, var(--gold) 0 30px, var(--forest) 30px 60px); }

/* ---------- Hero ---------- */
.hero { background: var(--forest); color: #fff; padding: 3rem 0 2.5rem; position: relative; overflow: hidden; }
.hero::after { /* soft hill silhouette */
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V70l120-30 140 40 170-60 160 50 140-30 190 45 170-55 200 40 150-20v60z' fill='%23163a2b'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 14ch; letter-spacing: -0.03em; }
.hero p.lead { color: #d6e6dc; max-width: 46ch; font-size: 1.12rem; }
.hero-search { background: #fff; border-radius: var(--radius); padding: .4rem; display: flex; gap: .4rem; max-width: 620px; }
.hero-search .form-control { border: 0; font-size: 1.05rem; }
.hero-search .form-control:focus { box-shadow: none; }
.hero-pay { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.25rem; color: #d6e6dc; font-size: .95rem; }
.hero-pay .bi { color: var(--gold); margin-right: .3rem; }
.hero-board { background: var(--forest-2); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 1rem; }
.hero-board h2 { font-size: 1rem; color: var(--gold); font-weight: 700; margin-bottom: .75rem; }
.hero-deal { display: flex; gap: .75rem; align-items: center; padding: .55rem; border-radius: var(--radius-sm); color: #fff; }
.hero-deal:hover { background: rgba(255,255,255,.07); color: #fff; }
.hero-deal img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; background: #fff; }
.hero-deal .nm { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.hero-deal .pr { color: var(--gold); font-weight: 700; }
.hero-deal s { color: #9fb8aa; font-size: .85rem; margin-left: .35rem; }

/* ---------- Sections ---------- */
.section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: 1.6rem; margin: 0; }
.section-head a { font-weight: 600; white-space: nowrap; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; color: var(--ink); display: flex; flex-direction: column; gap: .35rem; }
.cat-tile .bi { font-size: 1.6rem; color: var(--leaf); }
.cat-tile strong { font-size: .95rem; line-height: 1.25; }
.cat-tile span { font-size: .82rem; color: var(--muted); }
.cat-tile:hover { border-color: var(--leaf); color: var(--ink); }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .product-grid.cols-5 { grid-template-columns: repeat(5, 1fr); } }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.pcard:hover { border-color: #b7c9bd; }
.pcard .thumb { aspect-ratio: 1 / 1; background: #eef2ef; display: block; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: .7rem .8rem .8rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.pcard .store { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .name { color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard .name:hover { color: var(--forest); }
.pcard .price { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--forest); margin-top: .25rem; }
.pcard .price s { font-family: var(--font-body); font-weight: 400; font-size: .82rem; color: var(--muted); margin-left: .3rem; }
.pcard .alt { font-size: .78rem; color: var(--muted); }
.pcard form { margin-top: auto; padding-top: .55rem; }
.pcard .btn { width: 100%; padding: .45rem; font-size: .9rem; }
.tag-sale { position: absolute; top: .55rem; left: .55rem; background: var(--gold); color: var(--ink); font-weight: 800; font-size: .78rem; padding: .15rem .45rem; border-radius: 4px; }
.tag-cond { position: absolute; top: .55rem; right: .55rem; background: rgba(23,32,27,.78); color: #fff; font-size: .72rem; padding: .15rem .45rem; border-radius: 4px; }
.tag-out { position: absolute; inset: 0; background: rgba(255,255,255,.55); display: grid; place-items: center; font-weight: 700; color: var(--muted); pointer-events: none; aspect-ratio: 1/1; }

/* ---------- Store cards ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.scard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; gap: .85rem; align-items: center; color: var(--ink); }
.scard:hover { border-color: var(--leaf); color: var(--ink); }
.logo-box { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; background: var(--leaf-soft); color: var(--forest); font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.logo-box.lg { width: 96px; height: 96px; font-size: 2rem; border: 4px solid #fff; }
.scard .nm { font-weight: 700; line-height: 1.25; }
.scard .meta { font-size: .85rem; color: var(--muted); }

/* ---------- Vendor CTA band ---------- */
.sell-band { background: var(--gold-soft); border: 1px solid #f0dc95; border-radius: var(--radius-lg); padding: 2rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .sell-band { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.sell-band h2 { font-size: 1.8rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; counter-reset: s; }
.steps li { display: flex; gap: .75rem; align-items: flex-start; counter-increment: s; }
.steps li::before { content: counter(s); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }

/* ---------- Shop page ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 1.4rem 0; }
.page-head h1 { font-size: 1.8rem; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--forest); }
.filter-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.filter-box h3 { font-size: 1rem; margin-bottom: .6rem; }
.filter-list a { display: flex; justify-content: space-between; padding: .3rem 0; color: var(--ink); font-size: .93rem; }
.filter-list a.active { color: var(--forest); font-weight: 700; }
.filter-list a span { color: var(--muted); font-size: .85rem; }

/* ---------- Product page ---------- */
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1/1; overflow: hidden; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.gallery-thumbs button { border: 2px solid var(--line); border-radius: 8px; padding: 0; width: 68px; height: 68px; overflow: hidden; background: #fff; flex-shrink: 0; }
.gallery-thumbs button.on { border-color: var(--forest); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-price { font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; color: var(--forest); line-height: 1; }
.pd-price s { font-family: var(--font-body); font-size: 1.05rem; font-weight: 400; color: var(--muted); margin-left: .5rem; }
.pd-alt { color: var(--muted); }
.qty-input { width: 90px; text-align: center; }
.seller-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.pd-desc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 80ch; white-space: pre-line; }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.trust-list .bi { color: var(--leaf); margin-right: .45rem; }

/* ---------- Store page ---------- */
.store-cover { height: 180px; background: var(--forest) center/cover no-repeat; position: relative; }
.store-cover.plain { background-image: repeating-linear-gradient(135deg, var(--forest) 0 22px, #245840 22px 44px); }
.store-headline { margin-top: -48px; position: relative; display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.store-headline h1 { font-size: 1.8rem; margin: 0; }

/* ---------- Cart / checkout ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: .9rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #eef2ef; }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .75rem; font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; }
.pay-option { border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; background: #fff; margin-bottom: .6rem; }
.pay-option:has(input:checked) { border-color: var(--forest); background: var(--leaf-soft); }
.pay-option .form-check-input { margin-top: .25rem; flex-shrink: 0; }
.pay-option .bi { font-size: 1.4rem; color: var(--forest); }
.momo-box { background: var(--gold-soft); border: 1px solid #f0dc95; border-radius: var(--radius); padding: 1rem; }
.momo-number { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; }

/* ---------- Order tracking ---------- */
.track-steps { display: flex; justify-content: space-between; position: relative; margin: 1.5rem 0 .5rem; }
.track-steps::before { content: ""; position: absolute; top: 15px; left: 15px; right: 15px; height: 3px; background: var(--line); }
.track-steps .st { position: relative; z-index: 1; text-align: center; flex: 1; font-size: .8rem; color: var(--muted); }
.track-steps .dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto .35rem; display: grid; place-items: center; font-size: .9rem; }
.track-steps .st.done { color: var(--ink); font-weight: 600; }
.track-steps .st.done .dot { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ---------- Status badges ---------- */
.badge-status { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.bs-warning { background: #fff1c7; color: #7a5a00; }
.bs-info { background: #dcecfb; color: #164f86; }
.bs-primary { background: #dbeee3; color: var(--forest); }
.bs-success { background: #cdebd8; color: #146438; }
.bs-danger { background: #fadcd8; color: #8f2318; }
.bs-secondary { background: #e7e9e8; color: #505a55; }
.bs-light { background: #f0f2f1; color: #5d6b63; border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-2); color: #b9cec1; margin-top: 3rem; padding-bottom: 5rem; font-size: .93rem; }
@media (min-width: 992px) { .site-footer { padding-bottom: 0; } }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer a { color: #b9cec1; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; font-size: .85rem; }

/* ---------- Mobile bottom navigation ---------- */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 1030; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; text-align: center; padding: .45rem 0 .4rem; color: var(--muted); font-size: .72rem; font-weight: 600; position: relative; }
.bottom-nav a .bi { display: block; font-size: 1.3rem; line-height: 1.2; }
.bottom-nav a.active { color: var(--forest); }
.bottom-nav .cart-count { left: calc(50% + 4px); top: 2px; }
@media (min-width: 992px) { .bottom-nav { display: none; } }
.wa-float { position: fixed; right: 16px; bottom: 76px; width: 52px; height: 52px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; font-size: 1.6rem; z-index: 1020; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.wa-float:hover { color: #fff; background: #178a45; }
@media (min-width: 992px) { .wa-float { bottom: 24px; } }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 2.5rem auto; }
.auth-wrap.wide { max-width: 760px; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .bi { font-size: 2.6rem; color: #b7c9bd; display: block; margin-bottom: .5rem; }
.empty h2, .empty h3 { color: var(--ink); font-size: 1.25rem; }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--forest); border-color: var(--line); }
.pagination .active .page-link { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ==========================================================
   Dashboard (vendor + admin)
   ========================================================== */
.dash { display: flex; min-height: 100vh; background: #f1f4f2; }
.dash-side { width: 250px; background: var(--forest-2); color: #b9cec1; flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1040; transition: transform .2s ease; }
.dash-side .brand { padding: 1.1rem 1.1rem .9rem; font-size: 1.2rem; }
.dash-side .who { margin: 0 .8rem 1rem; padding: .7rem .8rem; background: rgba(255,255,255,.06); border-radius: var(--radius-sm); font-size: .85rem; }
.dash-side .who strong { color: #fff; display: block; font-size: .95rem; }
.dash-nav { list-style: none; padding: 0 .6rem 1rem; margin: 0; }
.dash-nav .grp { font-size: .78rem; color: #7f9a8a; padding: 1rem .6rem .35rem; }
.dash-nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; color: #cfe0d6; border-radius: var(--radius-sm); font-weight: 500; font-size: .94rem; }
.dash-nav a .bi { font-size: 1.1rem; width: 20px; }
.dash-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.dash-nav a.active { background: var(--gold); color: var(--ink); font-weight: 700; }
.dash-nav .count { margin-left: auto; background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: .05rem .45rem; }
.dash-nav a.active .count { background: var(--forest); color: #fff; }
.dash-main { flex: 1; margin-left: 250px; min-width: 0; }
.dash-top { background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.dash-top h1 { font-size: 1.25rem; margin: 0; }
.dash-body { padding: 1.25rem; }
@media (max-width: 991.98px) {
  .dash-side { transform: translateX(-100%); }
  .dash-side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .dash-main { margin-left: 0; }
}
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; }
.stat .lbl { font-size: .85rem; color: var(--muted); }
.stat .val { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.stat.hl { background: var(--forest); color: #fff; border-color: var(--forest); }
.stat.hl .lbl, .stat.hl .sub { color: #bcd6c6; }
.card-d { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-d > .hd { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.card-d > .hd h2 { font-size: 1.05rem; margin: 0; }
.card-d > .bd { padding: 1.1rem; }
.table-d { margin: 0; font-size: .92rem; }
.table-d th { font-size: .8rem; font-weight: 700; color: var(--muted); background: #f7f9f8; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-d td, .table-d th { padding: .65rem .9rem; vertical-align: middle; }
.table-d .thumb-sm { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #eef2ef; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: .5rem; }
.bars .b { flex: 1; background: var(--leaf); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .b:hover { background: var(--forest); }
.bars .b.zero { background: var(--line); }
.bars-x { display: flex; gap: 4px; font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.bars-x span { flex: 1; text-align: center; }
.img-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.img-manage .it { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.img-manage .it img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.img-manage .it .acts { display: flex; justify-content: space-between; padding: .25rem .35rem; font-size: .8rem; }
.img-manage .it.cover { border: 2px solid var(--gold); }
.filter-tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.filter-tabs a { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .88rem; background: #fff; }
.filter-tabs a.active { background: var(--forest); color: #fff; border-color: var(--forest); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.form-check-input:checked { background-color: var(--forest); border-color: var(--forest); }
.form-check-input:focus { border-color: var(--leaf); box-shadow: 0 0 0 .2rem rgba(46,125,91,.18); }
