@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#12131a;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#334155;
  --btn:#334155;
  --btnText:#fff;
  --warn:#d97706;
  --ok:#16a34a;
  --bad:#dc2626;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  background:var(--card);
  border-bottom:1px solid var(--line);
}

.brand{
  font-weight:800;
  letter-spacing:.2px;
}

.btn{
  background: var(--btn) !important;
  color: var(--btnText) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover{
  filter: brightness(1.05);
}
.btn:active{
  filter: brightness(0.95);
}
.btn:disabled{opacity:.55; cursor:not-allowed;}

.container{
  max-width: 100%;
  margin:14px auto;
  padding:0 14px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.kpi{
  grid-column: span 3;
}
.kpi .v{font-size:22px; font-weight:900;}
.kpi .l{font-size:12px; color:var(--muted); margin-top:2px;}

.h1{font-size:18px; font-weight:900; margin:0;}
.muted{color:var(--muted); font-size:13px;}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.input, select{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  outline:none;
  background:#fff;
  min-width:170px;
}

.table-wrap{overflow:auto;}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:14px;
}
th, td{
  text-align:left;
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
}
th{font-size:12px; color:var(--muted); font-weight:800;}
.badge{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--line);
  background:#fafafa;
}

.badge.ok{border-color:#bbf7d0; background:#f0fdf4;}
.badge.warn{border-color:#fed7aa; background:#fffbeb;}
.badge.bad{border-color:#fecaca; background:#fef2f2;}

.link{
  color:#2563eb;
  cursor:pointer;
  font-weight:700;
}

.modal-bg{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.modal{
  width:min(720px, 96vw);
  background:#fff;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.modal-h{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.modal-b{padding:14px;}
textarea{
  width:100%;
  min-height:90px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  resize:vertical;
}
.hr{height:1px; background:var(--line); margin:12px 0;}

cat >> ~/Desktop/sales_app/frontend/assets/css/theme.css <<'CSS'

/* ===========================
   Orbiz Minimal Accent Theme
   (subtle 1–2% highlights)
=========================== */

:root{
  --accent-red: rgba(239,68,68,0.85);
  --accent-red-soft: rgba(239,68,68,0.10);

  --accent-green: rgba(16,185,129,0.90);
  --accent-green-soft: rgba(16,185,129,0.12);

  --accent-orange: rgba(245,158,11,0.90);
  --accent-orange-soft: rgba(245,158,11,0.14);
}

/* Inputs: tiny accent focus */
.input:focus{
  outline:none !important;
  border-color: rgba(239,68,68,0.35) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.10) !important;
}

/* Buttons */
.btn{
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.btn:hover{
  transform: translateY(-1px);
}
.btn:active{
  transform: translateY(0px);
}

/* Primary button uses theme dark accent */
.btn:not(.btn-ghost){
  background: var(--btn) !important;
}
.btn:not(.btn-ghost):hover{
  box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
}

/* Ghost buttons */
.btn-ghost{
  background: var(--btn) !important;
  color: var(--btnText) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}
.btn-ghost:hover{
  border-color: rgba(239,68,68,0.25) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

/* KPI cards: tiny accent line */
.kpi-card{
  position: relative;
  overflow: hidden;
}
.kpi-card::before{
  content:"";
  position:absolute;
  left:0; top:0;
  width:100%;
  height:2px;
  background: rgba(239,68,68,0.55);
  opacity:0.9;
}

/* “Delivered” / “Pending” chip upgrades */
.chip-ok{
  background: var(--accent-green-soft) !important;
  border: 1px solid rgba(16,185,129,0.25) !important;
}
.chip-warn{
  background: var(--accent-orange-soft) !important;
  border: 1px solid rgba(245,158,11,0.25) !important;
}
.chip-bad{
  background: var(--accent-red-soft) !important;
  border: 1px solid rgba(239,68,68,0.25) !important;
}

/* Table header polishing */
table thead tr{
  background: rgba(0,0,0,0.03) !important;
}
table thead th{
  font-weight: 900 !important;
  color: rgba(0,0,0,0.60) !important;
}

/* Subtle hover row */
table tbody tr:hover{
  background: rgba(239,68,68,0.03);
}

/* Sort arrow: accent */
.sortArrow{
  color: rgba(239,68,68,0.75) !important;
}

CSS



/* ---------------------------
   Typography: Inter
---------------------------- */
:root{
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
html, body{
  font-family: var(--font-sans) !important;
}

/* Headings / titles in bold */
h1,h2,h3,h4,h5,h6,
.page-title,
.card-h b,
.kpi .label,
.kpi .value,
.section-title{
  font-weight: 700 !important;
}

/* Table: body values regular */
table td{
  font-weight: 400 !important;
}

/* Table headers a bit stronger */
table th{
  font-weight: 600 !important;
}


/* --- Sales screen: fixed page + table-only scroll --- */
html, body { height: 100%; overflow: hidden; }

#app { height: 100vh; overflow: hidden; }

/* sales area becomes fixed-height column layout */
.sales-screen{
  height: calc(100vh - 64px); /* topbar approx */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* small-screen fallback */
@media (max-width: 900px){
  .sales-screen{ height: calc(100vh - 92px); }
}

.sales-kpis-card,
.sales-filters-card{ flex: 0 0 auto; }

.sales-table-card{
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* only table area scrolls */
.sales-table-scroll{
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* keep table header visible while scrolling */
.sales-table-scroll thead th{
  position: sticky;
  top: 0;
  z-index: 2;
}


/* --- SALES: fixed screen + scroll inside table only --- */
body.sales-noscroll{
  overflow: hidden;
  height: 100vh;
}

.sales-page{
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.sales-table-card{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.table-scroll{
  flex: 1;
  overflow: auto;
  min-height: 0;
}

/* Sticky header without overlap */
.sales-table{
  width: 100%;
  min-width: 1200px;
  border-collapse: separate;
  border-spacing: 0;
}

.sales-table thead th{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;          /* ✅ solid background so rows won’t show through */
  box-shadow: 0 2px 0 rgba(0,0,0,0.06);
}


/* ✅ Sales page fixed layout + table-only scroll */
.sales-page{
  height: 100vh;
  overflow: hidden;
}

.sales-page .table-scroll{
  overflow-y: auto;
  overflow-x: auto;
  height: calc(100vh - 420px); /* adjust if needed */
  border-radius: 14px;
}

/* ✅ Sticky header inside table scroll */
.sales-page .table-scroll table{
  border-collapse: separate;
  border-spacing: 0;
}

.sales-page .table-scroll thead th{
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}


button{ background: var(--btn); color: var(--btnText); border: 1px solid rgba(0,0,0,0.10); border-radius:10px; }

/* ============================
   Production Status Modal
   ============================ */
.modal-backdrop {
  background: rgba(0,0,0,0.35) !important;
}
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
}

.modal-box {
  background: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}
  padding: 16px;
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.modal-box h3 {
  margin: 0 0 12px;
  font-weight: 900;
}

.modal-box table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.modal-box th,
.modal-box td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
}

/* ================= Production Modal ================= */
.prod-status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.prod-completed { background:#e6f6ee; color:#067647; }
.prod-ready     { background:#e8f0fe; color:#1d4ed8; }
.prod-pending   { background:#fff4e5; color:#92400e; }
.prod-unknown   { background:#f3f4f6; color:#374151; }

.prod-stuck td {
  background: #fff1f2;
}

.prod-reason {
  cursor: help;
  border-bottom: 1px dotted #9ca3af;
}

.prod-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.prod-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,#22c55e,#16a34a);
}

/* Production status colors */
.prod-status-done {
  color: #16a34a;
  font-weight: 600;
}

.prod-status-ready {
  color: #2563eb;
  font-weight: 600;
}

.prod-status-pending {
  color: #d97706;
  font-weight: 600;
}

.prod-stuck {
  background: #fee2e2;
}


.prod-reason {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #9ca3af;
}

.prod-reason::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: 125%;
  background: #111827;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: all .15s ease;
  z-index: 50;
}

.prod-reason:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.prod-stuck {
  background: #fff1f2;
}

.prod-stuck td {
  color: #991b1b;
  font-weight: 600;
}

#productionModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 1 !important;
  filter: none !important;
}
  z-index: 9999;
}

.modal-backdrop {
  background: rgba(0,0,0,0.35) !important;
}
  background: rgba(0,0,0,0.45);
}

.modal-box {
  background: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}
  width: 90%;
  max-width: 900px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

#productionModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}

#productionModal .modal-body {
  padding: 16px 18px;
  max-height: 70vh;
  overflow: auto;
}

.prod-product {
  margin-bottom: 18px;
}

.prod-product-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
}

.prod-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
}

.prod.done { color: #16a34a; font-weight: 800; }
.prod.progress { color: #f59e0b; font-weight: 800; }
.prod.ready { color: #2563eb; font-weight: 800; }
.prod.pending { color: #6b7280; font-weight: 800; }

/* --- FIX production modal dimming --- */
#productionModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 1 !important;
  filter: none !important;
}

#productionModal * {
  filter: none !important;
  opacity: 1 !important;
}

/* ===============================
   FORCE Production Modal Clarity
   =============================== */

#productionModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 1 !important;
  filter: none !important;
}
  filter: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  z-index: 999999 !important;
}

.modal-box {
  background: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}
  filter: none !important;
  backdrop-filter: none !important;
}

#productionModal * {
  filter: none !important;
  opacity: 1 !important;
}

body:has(#productionModal),
html:has(#productionModal) {
  filter: none !important;
  opacity: 1 !important;
}


/* ===============================
   FORCE Production Modal Clarity
   =============================== */

#productionModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 1 !important;
  filter: none !important;
}
  filter: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  z-index: 999999 !important;
}

.modal-box {
  background: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}
  filter: none !important;
  backdrop-filter: none !important;
}

#productionModal * {
  filter: none !important;
  opacity: 1 !important;
}

body:has(#productionModal),
html:has(#productionModal) {
  filter: none !important;
  opacity: 1 !important;
}
