/*
 * Quiet / premium dashboard theme.
 * White canvas, ink-black text, one green accent used sparingly.
 * Hairline borders instead of shadows. No decorative gradients.
 * Presentation only — no markup/route/controller/model logic here.
 */

:root{
  --fv-brand:#0a8f5c;
  --fv-brand-dark:#076e47;
  --fv-brand-tint:#eaf6f0;
  --fv-ink:#15181b;
  --fv-ink-soft:#5c636a;
  --fv-ink-faint:#98a0a6;
  --fv-line:#e9ebec;
  --fv-line-strong:#d8dbdd;
  --fv-canvas:#fbfbfa;
  --fv-surface:#ffffff;
  --fv-amber:#9a6a13;
  --fv-amber-bg:#faf3e3;
  --fv-amber-line:#e7b955;
  --fv-red:#a3302f;
  --fv-red-bg:#fbecec;
  --fv-red-line:#d9605f;
  --fv-radius-sm:10px;
  --fv-radius:14px;
  --fv-font-display:'TikTok Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- base canvas & type ---------- */
body{
  background:var(--fv-canvas) !important;
  color:var(--fv-ink);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{
  font-family:var(--fv-font-display);
  letter-spacing:-0.01em;
  color:var(--fv-ink);
}
::-webkit-scrollbar{width:8px;height:8px;}
::-webkit-scrollbar-thumb{background:var(--fv-line-strong);border-radius:8px;}
::-webkit-scrollbar-track{background:transparent;}

/* ---------- sidebar ---------- */
.lw-sidebar-container,
.navbar-vertical{
  background:var(--fv-surface) !important;
  border-right:1px solid var(--fv-line);
  box-shadow:none !important;
}
.navbar-vertical .navbar-brand{
  padding:20px 22px 16px !important;
  border-bottom:1px solid var(--fv-line);
  margin-bottom:14px;
}
.navbar-vertical .navbar-nav{
  padding:0 10px;
}
.navbar-vertical .navbar-nav .nav-item{
  margin-bottom:1px;
}
.navbar-vertical .navbar-nav .nav-item .nav-link{
  border-radius:8px;
  padding:9px 12px !important;
  color:var(--fv-ink-soft) !important;
  font-weight:600 !important;
  display:flex;
  align-items:center;
  gap:2px;
  border-left:2px solid transparent;
  transition:background .12s ease, color .12s ease, border-color .12s ease;
}
.navbar-vertical .navbar-nav .nav-item .nav-link:hover{
  background:var(--fv-canvas);
  color:var(--fv-ink) !important;
}
.navbar-vertical .navbar-nav > .nav-item > .nav-link.active{
  background:var(--fv-brand-tint) !important;
  color:var(--fv-ink) !important;
  border-left-color:var(--fv-brand);
  font-weight:700 !important;
}
.navbar-vertical .navbar-nav .nav-item .nav-link[data-fv-icon]{
  color:var(--fv-ink-faint);
  width:24px;
  font-size:15px;
  text-align:center;
  transition:color .12s ease;
}
.navbar-vertical .navbar-nav .nav-item .nav-link:hover [data-fv-icon]{
  color:var(--fv-ink-soft);
}
.navbar-vertical .navbar-nav > .nav-item > .nav-link.active [data-fv-icon]{
  color:var(--fv-brand) !important;
}
.navbar-vertical [data-fv-icon="sm"]{
  width:20px;
  font-size:12px;
}
.navbar-vertical .lw-expandable-nav .nav-link{
  padding-left:32px !important;
  font-size:.87rem;
  font-weight:500 !important;
}
.navbar-vertical .lw-expandable-nav .nav-link.active{
  background:var(--fv-brand-tint) !important;
  color:var(--fv-ink) !important;
  border-left-color:var(--fv-brand);
  font-weight:600 !important;
}
.navbar-vertical .lw-expandable-nav .nav-link.active [data-fv-icon]{
  color:var(--fv-brand) !important;
}

/* ---------- top navbar ---------- */
.navbar-top{
  background:rgba(255,255,255,.96) !important;
  border-bottom:1px solid var(--fv-line) !important;
}
.navbar-top .dropdown-menu{
  border-radius:12px !important;
  box-shadow:0 8px 24px rgba(20,24,27,.08) !important;
}

/* ---------- generic surfaces ---------- */
.card{
  border:1px solid var(--fv-line) !important;
  border-radius:var(--fv-radius) !important;
  box-shadow:none !important;
}
.card .card-body{
  padding:1.25rem;
}
.alert{
  border:none !important;
  border-radius:var(--fv-radius-sm) !important;
}

/* ================================================================
   Vendor dashboard
   ================================================================ */
.fv-dashboard .row{
  --bs-gutter-x:1.25rem;
}
.fv-section-gap{
  margin-top:1.25rem;
}

/* -- slim status / alert strips -- */
.fv-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  background:var(--fv-surface);
  border:1px solid var(--fv-line);
  border-left:3px solid var(--fv-ink-faint);
  border-radius:8px;
  padding:.6rem 1rem;
  margin-bottom:.75rem;
  font-size:.86rem;
}
.fv-strip-text{
  display:flex;
  align-items:center;
  gap:.6rem;
  color:var(--fv-ink-soft);
  font-weight:600;
}
.fv-strip-text i{font-size:1rem;}
.fv-strip-text a{color:inherit;text-decoration:underline;}
.fv-strip.fv-strip-danger{border-left-color:var(--fv-red-line);}
.fv-strip.fv-strip-danger .fv-strip-text{color:var(--fv-red);}
.fv-strip.fv-strip-warning{border-left-color:var(--fv-amber-line);}
.fv-strip.fv-strip-warning .fv-strip-text{color:var(--fv-amber);}
.fv-strip.fv-strip-ok{border-left-color:var(--fv-brand);}
.fv-strip.fv-strip-ok .fv-strip-text{color:var(--fv-ink);}
.fv-strip-link{
  font-weight:700;
  font-size:.82rem;
  white-space:nowrap;
  color:var(--fv-brand-dark);
  text-decoration:none;
}
.fv-strip-link:hover{color:var(--fv-brand-dark);text-decoration:underline;}
.fv-strip-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--fv-brand);
  flex-shrink:0;
}
.fv-strip-dot.fv-dot-red{background:var(--fv-red-line);}
.fv-strip-dot.fv-dot-amber{background:var(--fv-amber-line);}

/* -- KPI row -- */
.fv-kpi{
  height:100%;
}
.fv-kpi-label{
  font-size:.72rem;
  font-weight:700;
  color:var(--fv-ink-faint);
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:.5rem;
}
.fv-kpi-value{
  font-family:var(--fv-font-display);
  font-size:1.9rem;
  font-weight:800;
  color:var(--fv-ink);
  line-height:1;
}
.fv-kpi-sub{
  font-size:.78rem;
  color:var(--fv-ink-faint);
  margin-top:.4rem;
}
.fv-kpi-sub.fv-up{color:var(--fv-brand-dark);}

/* -- card heading -- */
.fv-card-title{
  font-family:var(--fv-font-display);
  font-size:.98rem;
  font-weight:800;
  color:var(--fv-ink);
  margin-bottom:1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.fv-card-title small{
  font-family:inherit;
  font-size:.72rem;
  font-weight:600;
  color:var(--fv-ink-faint);
  text-transform:none;
}

/* -- setup checklist -- */
.fv-checklist{
  display:flex;
  flex-direction:column;
  gap:.15rem;
}
.fv-check-row{
  display:flex;
  align-items:center;
  gap:.7rem;
  padding:.6rem .1rem;
  border-bottom:1px solid var(--fv-line);
  text-decoration:none;
  color:var(--fv-ink);
}
.fv-check-row:last-child{border-bottom:none;}
.fv-check-row:hover{color:var(--fv-ink);text-decoration:none;}
.fv-check-mark{
  width:20px;height:20px;
  border-radius:50%;
  border:1.5px solid var(--fv-line-strong);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
  font-size:.65rem;
  color:transparent;
}
.fv-check-row.fv-done .fv-check-mark{
  background:var(--fv-brand);
  border-color:var(--fv-brand);
  color:#fff;
}
.fv-check-row.fv-done .fv-check-label{color:var(--fv-ink-faint);text-decoration:line-through;}
.fv-check-label{font-weight:600;font-size:.88rem;flex:1;}
.fv-check-row .fv-qa-chevron{color:var(--fv-ink-faint);font-size:.8rem;}

/* -- delivery split bar (sent vs pending) -- */
.fv-split-bar{
  height:10px;
  border-radius:6px;
  background:var(--fv-line);
  overflow:hidden;
  display:flex;
  margin:1rem 0 .9rem;
}
.fv-split-bar-sent{
  background:var(--fv-brand);
  height:100%;
}
.fv-split-legend{
  display:flex;
  justify-content:space-between;
  font-size:.82rem;
}
.fv-split-legend-item{display:flex;align-items:center;gap:.4rem;color:var(--fv-ink-soft);font-weight:600;}
.fv-split-legend-item .fv-dot{width:8px;height:8px;border-radius:50%;}
.fv-split-legend-item .fv-dot.fv-dot-sent{background:var(--fv-brand);}
.fv-split-legend-item .fv-dot.fv-dot-pending{background:var(--fv-line-strong);}
.fv-split-legend-item b{color:var(--fv-ink);font-weight:800;}

/* -- quiet quick actions list -- */
.fv-quick-actions{
  display:flex;
  flex-direction:column;
}
.fv-quick-action{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.65rem .1rem;
  border-bottom:1px solid var(--fv-line);
  text-decoration:none;
  color:var(--fv-ink);
}
.fv-quick-action:last-child{border-bottom:none;}
.fv-quick-action:hover{color:var(--fv-ink);text-decoration:none;}
.fv-quick-action:hover .fv-qa-title{color:var(--fv-brand-dark);}
.fv-quick-action .fv-qa-icon{
  width:30px;
  color:var(--fv-ink-faint);
  font-size:1rem;
  text-align:center;
  flex-shrink:0;
}
.fv-quick-action .fv-qa-title{font-weight:600;font-size:.9rem;transition:color .12s ease;}
.fv-quick-action .fv-qa-chevron{color:var(--fv-ink-faint);margin-left:auto;font-size:.8rem;}

/* -- quiet secondary stat strip -- */
.fv-mini-stats{
  display:flex;
  flex-wrap:wrap;
  gap:0;
}
.fv-mini-stat{
  flex:1 1 0;
  min-width:110px;
  text-decoration:none;
  color:var(--fv-ink);
  padding:.2rem 1rem;
  border-right:1px solid var(--fv-line);
}
.fv-mini-stat:last-child{border-right:none;}
.fv-mini-stat:hover{color:var(--fv-ink);text-decoration:none;}
.fv-mini-stat .fv-mini-value{
  font-family:var(--fv-font-display);
  font-size:1.25rem;
  font-weight:800;
  color:var(--fv-ink);
}
.fv-mini-stat .fv-mini-label{
  font-size:.74rem;
  color:var(--fv-ink-faint);
  font-weight:600;
}
@media (max-width:767.98px){
  .fv-mini-stat{border-right:none;border-bottom:1px solid var(--fv-line);padding:.6rem .1rem;}
  .fv-mini-stat:last-child{border-bottom:none;}
}

/* -- QR block -- */
.fv-qr-row{
  display:flex;
  align-items:center;
  gap:1rem;
}
.fv-qr-row img.lw-qr-image{
  border:1px solid var(--fv-line) !important;
  padding:4px;
  border-radius:8px;
  background:#fff;
}
.fv-qr-name{font-weight:700;color:var(--fv-ink);font-size:.9rem;}
.fv-qr-number{font-weight:600;color:var(--fv-ink-faint);font-size:.82rem;}
.fv-qr-empty{color:var(--fv-ink-faint);font-size:.85rem;}

/* -- demo banner -- */
.fv-demo-banner{
  background:var(--fv-canvas) !important;
  border:1px solid var(--fv-line) !important;
  border-radius:var(--fv-radius) !important;
  color:var(--fv-ink);
}
.fv-demo-banner h2{font-size:1.1rem;color:var(--fv-ink);}

/* ================================================================
   Dark mode — reuses the app's own theme signal (lw-theme-mode
   attribute + users_current_app_theme session, set via the existing
   route('change.app.theme', ...)). No new/competing dark-mode system.
   Because every rule above reads var(--fv-*), redefining the
   variables here re-themes the whole dashboard automatically.
   ================================================================ */
html[lw-theme-mode="dark"]{
  --fv-brand:#17b57a;
  --fv-brand-dark:#12996a;
  --fv-brand-tint:#123024;
  --fv-ink:#eef1f0;
  --fv-ink-soft:#a9b2b6;
  --fv-ink-faint:#727b7f;
  --fv-line:#262b2d;
  --fv-line-strong:#383f42;
  --fv-canvas:#101314;
  --fv-surface:#16191b;
  --fv-amber:#e3ac52;
  --fv-amber-bg:#2c2413;
  --fv-amber-line:#c99539;
  --fv-red:#e2807d;
  --fv-red-bg:#2c1919;
  --fv-red-line:#c2615e;
}
@media (prefers-color-scheme: dark){
  html[lw-theme-mode="system_default"]{
    --fv-brand:#17b57a;
    --fv-brand-dark:#12996a;
    --fv-brand-tint:#123024;
    --fv-ink:#eef1f0;
    --fv-ink-soft:#a9b2b6;
    --fv-ink-faint:#727b7f;
    --fv-line:#262b2d;
    --fv-line-strong:#383f42;
    --fv-canvas:#101314;
    --fv-surface:#16191b;
    --fv-amber:#e3ac52;
    --fv-amber-bg:#2c2413;
    --fv-amber-line:#c99539;
    --fv-red:#e2807d;
    --fv-red-bg:#2c1919;
    --fv-red-line:#c2615e;
  }
}

/* ================================================================
   New: delta badges, sparklines, chart cards, range switcher,
   skeleton loaders, campaign bars, activity feed, command palette,
   theme toggle icon
   ================================================================ */

.fv-kpi-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.5rem;
}
.fv-delta{
  display:inline-flex;
  align-items:center;
  gap:3px;
  font-size:.72rem;
  font-weight:700;
  padding:1px 6px;
  border-radius:20px;
}
.fv-delta.fv-delta-up{color:var(--fv-brand-dark);background:var(--fv-brand-tint);}
.fv-delta.fv-delta-down{color:var(--fv-red);background:var(--fv-red-bg);}
.fv-delta.fv-delta-flat{color:var(--fv-ink-faint);background:var(--fv-canvas);}
.fv-kpi-sparkline{
  display:block;
  width:100%;
  height:28px;
  margin-top:.5rem;
}
.fv-kpi-sparkline polyline{
  fill:none;
  stroke:var(--fv-brand);
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.fv-kpi-sparkline polygon{
  fill:var(--fv-brand-tint);
  stroke:none;
}

.fv-chart-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.6rem;
  margin-bottom:.9rem;
}
.fv-range-switcher{
  display:inline-flex;
  border:1px solid var(--fv-line);
  border-radius:8px;
  overflow:hidden;
}
.fv-range-btn{
  border:none;
  background:var(--fv-surface);
  color:var(--fv-ink-soft);
  font-size:.76rem;
  font-weight:700;
  padding:.3rem .6rem;
  cursor:pointer;
}
.fv-range-btn + .fv-range-btn{border-left:1px solid var(--fv-line);}
.fv-range-btn.fv-active{background:var(--fv-brand);color:#fff;}
.fv-chart-wrap{position:relative;height:220px;}
.fv-chart-wrap.fv-chart-sm{height:190px;}

.fv-skeleton{
  border-radius:8px;
  background:linear-gradient(90deg, var(--fv-line) 25%, var(--fv-line-strong) 37%, var(--fv-line) 63%);
  background-size:400% 100%;
  animation:fvShimmer 1.4s ease infinite;
}
@keyframes fvShimmer{
  0%{background-position:100% 50%;}
  100%{background-position:0 50%;}
}

.fv-campaign-row{
  margin-bottom:.85rem;
}
.fv-campaign-row:last-child{margin-bottom:0;}
.fv-campaign-row-top{
  display:flex;
  justify-content:space-between;
  font-size:.82rem;
  margin-bottom:.35rem;
}
.fv-campaign-row-top .fv-c-title{font-weight:600;color:var(--fv-ink);}
.fv-campaign-row-top .fv-c-count{font-weight:700;color:var(--fv-ink-soft);}
.fv-campaign-track{
  height:7px;
  border-radius:5px;
  background:var(--fv-line);
  overflow:hidden;
}
.fv-campaign-fill{
  height:100%;
  background:var(--fv-brand);
  border-radius:5px;
}
.fv-empty-note{
  color:var(--fv-ink-faint);
  font-size:.85rem;
}

.fv-activity-feed{
  display:flex;
  flex-direction:column;
}
.fv-activity-item{
  display:flex;
  align-items:flex-start;
  gap:.7rem;
  padding:.6rem 0;
  border-bottom:1px solid var(--fv-line);
}
.fv-activity-item:last-child{border-bottom:none;}
.fv-activity-icon{
  width:30px;height:30px;
  border-radius:8px;
  background:var(--fv-brand-tint);
  color:var(--fv-brand-dark);
  display:flex;align-items:center;justify-content:center;
  font-size:.85rem;
  flex-shrink:0;
}
.fv-activity-title{font-size:.85rem;font-weight:600;color:var(--fv-ink);}
.fv-activity-sub{font-size:.78rem;color:var(--fv-ink-faint);}
.fv-activity-time{font-size:.72rem;color:var(--fv-ink-faint);white-space:nowrap;margin-left:auto;padding-left:.5rem;}

.fv-checklist-done-note{
  display:flex;
  align-items:center;
  gap:.5rem;
  color:var(--fv-brand-dark);
  font-weight:700;
  font-size:.9rem;
}

/* -- command palette -- */
.fv-cmdk-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,18,20,.45);
  z-index:2000;
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding-top:12vh;
}
.fv-cmdk-overlay.fv-open{display:flex;}
.fv-cmdk-modal{
  width:100%;
  max-width:560px;
  background:var(--fv-surface);
  border-radius:14px;
  border:1px solid var(--fv-line);
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  overflow:hidden;
  max-height:70vh;
  display:flex;
  flex-direction:column;
}
.fv-cmdk-input{
  border:none;
  border-bottom:1px solid var(--fv-line);
  padding:.9rem 1.1rem;
  font-size:.95rem;
  width:100%;
  background:var(--fv-surface);
  color:var(--fv-ink);
  outline:none;
}
.fv-cmdk-list{
  overflow-y:auto;
  padding:.5rem;
}
.fv-cmdk-item{
  display:flex;
  align-items:center;
  gap:.7rem;
  padding:.6rem .7rem;
  border-radius:8px;
  cursor:pointer;
  color:var(--fv-ink);
  text-decoration:none;
}
.fv-cmdk-item i{width:18px;color:var(--fv-ink-faint);font-size:.9rem;}
.fv-cmdk-item.fv-cmdk-active{background:var(--fv-brand-tint);}
.fv-cmdk-item.fv-cmdk-active i{color:var(--fv-brand-dark);}
.fv-cmdk-empty{padding:1rem;color:var(--fv-ink-faint);font-size:.85rem;text-align:center;}
.fv-cmdk-hint{
  border-top:1px solid var(--fv-line);
  padding:.5rem 1rem;
  font-size:.72rem;
  color:var(--fv-ink-faint);
  display:flex;
  gap:1rem;
}
.fv-cmdk-hint kbd{
  background:var(--fv-canvas);
  border:1px solid var(--fv-line);
  border-radius:4px;
  padding:0 5px;
  font-size:.7rem;
}

.fv-search-trigger{cursor:pointer;}
