/* FLO Dark Mode — opt-in via [data-flo-theme="dark"] on <html>
   Frontend-only, no logic affected. */
html[data-flo-theme="dark"]{
  --wh:#0F1A17;
  --bg:#0A1310;
  --bd:#1E2A26;
  --bd2:#2A3A35;
  --t1:#E8F0EC;
  --t2:#A8B8B2;
  --t3:#6E8079;
  --obg:#0F2620;
  --odim:#0A1F1A;
  color-scheme:dark;
}
html[data-flo-theme="dark"] body{
  background:#0A1310!important;
  color:#E8F0EC!important;
}
html[data-flo-theme="dark"] .topbar{
  background:#0F1A17!important;
  border-bottom-color:#1E2A26!important;
}

/* Page headings — fix invisible "Settings" / "Dashboard" titles */
html[data-flo-theme="dark"] h1,
html[data-flo-theme="dark"] h2,
html[data-flo-theme="dark"] h3,
html[data-flo-theme="dark"] h4,
html[data-flo-theme="dark"] .h1,
html[data-flo-theme="dark"] #v70PageTitle h1,
html[data-flo-theme="dark"] .admin-tab-title h2{
  color:#E8F0EC!important;
}
html[data-flo-theme="dark"] .admin-tab-title span,
html[data-flo-theme="dark"] .sub{color:#8FA39C!important}

/* Cards & panels (all variants) */
html[data-flo-theme="dark"] .card,
html[data-flo-theme="dark"] .table-wrap,
html[data-flo-theme="dark"] .modal-box,
html[data-flo-theme="dark"] .login-card,
html[data-flo-theme="dark"] .v51-sidebar,
html[data-flo-theme="dark"] .clean-card-head,
html[data-flo-theme="dark"] [class*="-card"]{
  background:#0F1A17!important;
  border-color:#1E2A26!important;
  color:#E8F0EC!important;
  box-shadow:0 1px 2px rgba(0,0,0,.4)!important;
}
/* sub-panels with hardcoded white bg via inline / utility */
html[data-flo-theme="dark"] [style*="background:#fff"],
html[data-flo-theme="dark"] [style*="background:#FFF"],
html[data-flo-theme="dark"] [style*="background: #fff"]{
  background:#0F1A17!important;
}

html[data-flo-theme="dark"] .login{
  background:radial-gradient(1200px 600px at 80% -10%,#0F2620 0%,transparent 60%),radial-gradient(900px 500px at -10% 110%,#0A1F1A 0%,transparent 55%),linear-gradient(135deg,#0A1310 0%,#0F1A17 100%)!important;
}

/* Inputs */
html[data-flo-theme="dark"] .input,
html[data-flo-theme="dark"] input[type="text"],
html[data-flo-theme="dark"] input[type="number"],
html[data-flo-theme="dark"] input[type="password"],
html[data-flo-theme="dark"] input[type="search"],
html[data-flo-theme="dark"] textarea,
html[data-flo-theme="dark"] select{
  background:#0A1310!important;
  border-color:#2A3A35!important;
  color:#E8F0EC!important;
}
html[data-flo-theme="dark"] .input::placeholder,
html[data-flo-theme="dark"] textarea::placeholder{color:#6E8079!important}

/* Buttons */
html[data-flo-theme="dark"] .btn-secondary{
  background:#0F1A17!important;
  color:#A8B8B2!important;
  border-color:#2A3A35!important;
}
html[data-flo-theme="dark"] .btn-secondary:hover{
  background:#142B25!important;
  color:#23E6A1!important;
  border-color:#0FB57A!important;
}
html[data-flo-theme="dark"] .btn-dark{
  background:#23E6A1!important;
  color:#0A1310!important;
}

/* Tables */
html[data-flo-theme="dark"] th{
  background:#0F1A17!important;
  color:#A8B8B2!important;
  border-bottom-color:#1E2A26!important;
}
html[data-flo-theme="dark"] td{
  border-top-color:#1E2A26!important;
  color:#E8F0EC!important;
}
html[data-flo-theme="dark"] tr:hover td{background:#142B25!important}

/* Empty + pills */
html[data-flo-theme="dark"] .empty{
  background:#0F1A17!important;
  border-color:#2A3A35!important;
  color:#6E8079!important;
}
html[data-flo-theme="dark"] .user-pill{
  background:#0A1310!important;
  border-color:#1E2A26!important;
  color:#A8B8B2!important;
}

/* KDS dark */
html[data-flo-theme="dark"] .ticket{
  background:#0F1A17!important;
  color:#E8F0EC!important;
}
html[data-flo-theme="dark"] .t-head,
html[data-flo-theme="dark"] .t-actions{
  background:#0A1310!important;
  border-color:#1E2A26!important;
}
html[data-flo-theme="dark"] .t-item{
  background:#0A1310!important;
  color:#E8F0EC!important;
}

/* Sidebar (admin v51) */
html[data-flo-theme="dark"] .v51-sidebar{
  background:#0F1A17!important;
  border-right-color:#1E2A26!important;
}
html[data-flo-theme="dark"] .v51-side-btn{color:#A8B8B2!important}
html[data-flo-theme="dark"] .v51-side-btn:hover{
  background:#0F2620!important;
  border-color:#0A8E5F!important;
  color:#23E6A1!important;
}
html[data-flo-theme="dark"] .v51-side-icon{
  background:#142B25!important;
  color:#23E6A1!important;
}
html[data-flo-theme="dark"] .v51-brand-text b{color:#E8F0EC!important}
html[data-flo-theme="dark"] .v51-brand-text span{color:#8FA39C!important}
html[data-flo-theme="dark"] .v51-footer-note{
  background:#0A1310!important;
  border-color:#1E2A26!important;
  color:#8FA39C!important;
}
html[data-flo-theme="dark"] .v51-footer-note b{color:#E8F0EC!important}

/* KPI stats cards */
html[data-flo-theme="dark"] .stats > *{
  background:#0F1A17!important;
  border-color:#1E2A26!important;
  color:#E8F0EC!important;
}

/* Admin tabbar */
html[data-flo-theme="dark"] .admin-tabbar,
html[data-flo-theme="dark"] [data-admin-tab]{
  background:#0F1A17!important;
  color:#A8B8B2!important;
  border-color:#1E2A26!important;
}
html[data-flo-theme="dark"] [data-admin-tab].active{
  background:linear-gradient(135deg,#0FB57A,#13D08C)!important;
  color:#fff!important;
}

/* Admin chip */
html[data-flo-theme="dark"] .admin-chip{
  background:#0F2620!important;
  color:#23E6A1!important;
  border-color:#0A8E5F!important;
}

/* Hardcoded light grays from embedded styles */
html[data-flo-theme="dark"] [style*="background:#F9FAFB"],
html[data-flo-theme="dark"] [style*="background:#F8FAFC"],
html[data-flo-theme="dark"] [style*="background:#F4F5F7"],
html[data-flo-theme="dark"] [style*="background:#F6F7F9"]{
  background:#0F1A17!important;
}

/* Receipt — keep light (it's printed on paper, must read clearly) */
html[data-flo-theme="dark"] .receipt-paper-v19,
html[data-flo-theme="dark"] .cashier-receipt-paper{
  background:#fff!important;
  color:#111827!important;
}

/* Scrollbars */
html[data-flo-theme="dark"] *::-webkit-scrollbar-track{
  background:#1E2A26!important;
  border-color:#0A1310!important;
}
html[data-flo-theme="dark"] *::-webkit-scrollbar-thumb{
  border-color:#0A1310!important;
}
