/* ============================================================================
   Oz POS — shop portal THEME: the "Omah" look (owner 2026-10-25: "use them for the portal … touch friendly big icons
   … apply this one to the portal only, not to the admin"). Reference = the local Omah template
   (C:\xampp\htdocs\omah admin, DexignZone, Bootstrap 5.3). Nothing is copied from its 1.1 MB style.css: its design
   tokens and component looks are re-expressed here for OUR class names (style.css + cards.css stay the structure).
   Loaded after style.css / cards.css (and before pos.css) by portal style(). The admin never loads it.

   Omah tokens: primary #3B4CB8 (now OZ POS brand purple #49316B) · success #37D159 · info #2B98D6 · warning #FF9F0F · danger #FF6746 · ground #F5F5F5 ·
   line #E6E6E6 · radius .75rem · card shadow 0 5px 5px rgba(82,63,105,.05) · Poppins · compact big-icon sidebar
   11rem · header 4.5rem · controls 2.8rem. Text greys darkened a step for WCAG AA on white.
   ========================================================================== */

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

:root {
  --paper:      #F5F5F5;
  --surface:    #FFFFFF;
  --surface-2:  #F4F5FA;
  --surface-3:  #E9EBF5;
  --ink:        #111111;
  --ink-2:      #545A66;
  --muted:      #6F6D85;
  --line:       #E6E6E6;
  --line-2:     #D9DBE3;

  --herb:       #49316B;   /* primary — OZ POS brand purple (brand kit 2026-11-15) */
  --herb-soft:  #EFEBF5;
  --herb-deep:  #3A2756;
  --herb-line:  #D6CDE3;
  --herb-ink:   #2A1B40;

  --citrus:     #E08A00;   /* Omah warning #FF9F0F, deepened for text */
  --citrus-soft:#FFF4E2;
  --citrus-line:#FFE2B3;
  --citrus-ink: #8A5300;
  --berry:      #E2492A;   /* Omah danger #FF6746, deepened for text */
  --berry-soft: #FFEEEA;
  --berry-line: #FFD3C9;
  --info:       #2B98D6;
  --info-soft:  #E7F4FB;
  --info-line:  #C3E3F4;
  --info-ink:   #1B6896;
  --ok:         #37D159;
  --ok-soft:    #E6F9EA;
  --ok-ink:     #1C7F33;

  --row-hover:  #F7F8FC;
  --shade:      #523F69;   /* Omah shadow tint (rgba(82,63,105,…)) */
  --nav-ink:    #737B8B;   /* sidebar item text */
  --nav-icon:   #96A0AF;   /* sidebar item icon */
  --nav-hover:  #F0F1F6;   /* sidebar item hover wash */
  --nav-active: #E0E0E4;   /* sidebar item active wash */

  --r-sm: 8px;
  --r:    12px;            /* Omah $radius .75rem */
  --r-lg: 16px;

  --shadow-sm: 0 5px 5px 0 rgba(82, 63, 105, .05);
  --shadow:    0 0 2.5rem 0 rgba(82, 63, 105, .10);
  --shadow-lg: 0 10px 40px -6px rgba(82, 63, 105, .22);
  --shadow-btn: none;
  --shadow-btn-h: 0 6px 14px -4px rgba(73, 49, 107, .45);
  --ring: 0 0 0 3px rgba(73, 49, 107, .18);

  --sidebar-w: 11rem;      /* Omah compact deznav */
  --topbar-h:  4.5rem;
  --control-h: 44px;       /* touch: Omah .form-control 2.8rem */

  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: var(--font-body);
}

body { font-size: 14px; color: var(--ink-2); }
h1, h2, h3, .display { font-weight: 600; letter-spacing: 0; color: var(--ink); }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--surface);
  backdrop-filter: none;
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--line);
  padding: 0 24px 0 0;
  gap: 12px;
}
[dir="rtl"] .topbar { padding: 0 0 0 24px; }
.topbar .brand {
  width: var(--sidebar-w);
  flex: none;
  justify-content: center;
  height: 100%;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 0 10px;
  text-align: center;
  line-height: 1.2;
}
.topbar .brand .brand-logo { height: 28px; width: auto; flex: none; }
.avatar { width: 44px; height: 44px; border-radius: var(--r); font-size: 16px; font-weight: 600; }
.topbar .dropdown-toggle { font-weight: 600; font-size: 14px; }
.topbar .btn, .topbar .badge { border-radius: var(--r); font-size: 13px; font-weight: 500; min-height: 44px; padding: 0 14px; }
.topbar .chip { min-height: 32px; }
#sidebarToggle { width: 44px; height: 44px; margin-inline-start: 12px; border-radius: var(--r); }

/* --------------------------------------------------- big-icon sidebar (deznav) */
.sidebar { border-inline-end: 0; box-shadow: 0 0 2.5rem 0 color-mix(in srgb, var(--shade) 6%, transparent); }
.sidebar-inner { padding: 14px 0 32px; }
.nav-group { margin: 0; padding: 4px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line); }
.nav-group-title { display: none; }   /* Omah: icons + labels only */

.nav-item {
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 86px;
  padding: 12px 8px;
  margin: 0;
  border-radius: 0;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--nav-ink);
  line-height: 1.2;
}
.nav-item i {
  width: 3.2rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--nav-icon);
}
.nav-item:hover { background: linear-gradient(to right, var(--nav-hover) 0%, transparent 100%); color: var(--herb); }
.nav-item:hover i { color: var(--herb); }
.nav-item.active {
  background: linear-gradient(to right, var(--nav-active) 0%, transparent 100%);
  color: var(--herb);
  font-weight: 600;
}
[dir="rtl"] .nav-item:hover { background: linear-gradient(to left, var(--nav-hover) 0%, transparent 100%); }
[dir="rtl"] .nav-item.active { background: linear-gradient(to left, var(--nav-active) 0%, transparent 100%); }
.nav-item.active i { color: var(--herb); }
.nav-item.active::before {
  inset-block: 10px;
  inset-inline-start: 0;
  width: 8px;
  border-start-end-radius: var(--r);
  border-end-end-radius: var(--r);
}
.nav-badge { position: absolute; top: 10px; inset-inline-end: 22px; margin: 0; }

/* ------------------------------------------------------------- content */
.content { padding: calc(var(--topbar-h) + 30px) 30px 56px; }

.page-head { margin-bottom: 24px; align-items: center; }
.page-head h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: 0; }
.page-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- cards */
.card-x, .form-section, .pcard, .dcard, .ucard, .stat, .dataTables_wrapper {
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card-x .card-x-head, .form-section-head { padding: 20px 24px 14px; border-bottom: 0; }
.card-x .card-x-head h3, .form-section-head h3 { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.card-x .card-x-body { padding: 24px; }
.card-x .card-x-head + .card-x-body { padding-top: 6px; }
.form-section-body { padding: 6px 24px 24px; }
.form-section { margin-bottom: 24px; }
.form-section-head > i { width: 40px; height: 40px; border-radius: var(--r); font-size: 16px; }
.pcard:hover, .dcard:hover, .ucard:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }

/* product cards: Omah "new arrival" tile — bigger photo, gentle zoom on hover */
.dcard-media { height: 170px; transition: background-size .35s var(--ease); background-size: cover; overflow: hidden; }
.dcard:hover .dcard-media { background-size: 112%; }
.dcard-body h3, .ucard-id h3 { font-size: 1rem; font-weight: 600; color: var(--ink); }
.ucard { padding: 22px; }
.ucard-head .avatar-lg, .ucard-head .avatar { border-radius: var(--r); }

/* card stats: Omah media/icon chips, bigger */
.cstat i { width: 36px; height: 36px; border-radius: var(--r); font-size: 15px; }
.cstat strong { font-size: 13.5px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.cstat span { font-size: 11.5px; }
.card-actions .btn { min-height: 40px; padding: 0 16px; font-size: 13px; }

/* ---------------------------------------------- stat tiles = Omah widget-stat */
.stat {
  padding: 24px;
  padding-inline-end: 104px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat .label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  order: 2;
  margin-top: 4px;
}
.stat .label i {
  position: absolute;
  top: 50%;
  inset-inline-end: 22px;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--herb-soft);
  color: var(--herb);
}
.stat .value { order: 1; margin-top: 0; font-size: 1.75rem !important; font-weight: 600; letter-spacing: 0; color: var(--ink); line-height: 1.2; }
.stat .sub { order: 3; font-size: 12.5px; }
.stat:hover { box-shadow: var(--shadow); border-color: transparent; }
.stat.accent { background: var(--herb); }
.stat.accent .value, .stat.accent .label, .stat.accent .sub { color: var(--on-accent); }
.stat.accent .label i { background: color-mix(in srgb, var(--on-accent) 18%, transparent); color: var(--on-accent); }
.stat.warn { background: var(--surface); box-shadow: inset 0 0 0 2px var(--citrus-line), var(--shadow-sm); }
.stat.warn .value { color: var(--citrus-ink); }
.stat.warn .label { color: var(--citrus-ink); }
.stat.warn .label i { background: var(--citrus-soft); color: var(--citrus); }

/* ---------------------------------------------------------------- tables */
.table { --bs-table-hover-bg: var(--row-hover); }
.table > thead th { color: var(--ink); font-size: 13.5px; font-weight: 600; text-transform: none; letter-spacing: 0;
                    padding: 14px 12px; border-bottom: 1px solid var(--line); background: transparent; }
.table > tbody td { padding: 14px 12px; border-color: var(--line); }
.tfoot-total td { font-weight: 600; color: var(--ink); background: var(--surface-2); }

/* ---------------------------------------------------------------- chips */
.chip { border-radius: 6px; font-weight: 500; padding: 4px 10px; border: 0; }
.chip.ok     { background: var(--ok-soft);     color: var(--ok-ink); }
.chip.warn   { background: var(--citrus-soft); color: var(--citrus-ink); }
.chip.off    { background: var(--surface-2);   color: var(--muted); }
.chip.danger { background: var(--berry-soft);  color: var(--berry); }
.chip.info   { background: var(--herb-soft);   color: var(--herb-ink); }

/* ----------------------------------------------------------- touch controls */
.form-label { font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.form-control, .form-select { border-color: var(--line); border-radius: var(--r); padding: 11px 16px; font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--herb); box-shadow: var(--ring); }
/* ONE CONTROL HEIGHT (owner rule 2026-10-25): the -sm variants are as tall as every other control. */
.form-control-sm, .form-select-sm { min-height: var(--control-h); border-radius: var(--r); font-size: 14px; padding: 11px 16px; }
.form-select-sm { padding-inline-end: 36px; }
.select2-container--bootstrap-5 .select2-selection,
.form-select ~ .select2-container--bootstrap-5 .select2-selection,
.form-select-sm ~ .select2-container--bootstrap-5 .select2-selection { min-height: var(--control-h); border-color: var(--line); border-radius: var(--r); font-size: 14px; }
.select2-container--bootstrap-5 .select2-selection--multiple, .select2-container--bootstrap-5 .select2-selection--single { padding-block: 8px; }

.btn { border-radius: var(--r); font-weight: 500; font-size: 14px; padding: 0 20px; letter-spacing: 0; box-shadow: none; }
.btn-sm { min-height: var(--control-h); padding: 0 16px; font-size: 13.5px; border-radius: var(--r); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-icon { width: 44px; height: 44px; border-radius: var(--r); }
.btn-primary, .btn-success { --btn-bg: var(--herb); --btn-bd: var(--herb); --btn-bg-h: var(--herb-deep); --btn-bd-h: var(--herb-deep); }

.filter-pill { border-radius: var(--r); border-color: var(--line); padding: 0 18px; font-size: 13.5px; font-weight: 500; box-shadow: none; }
.filter-pill.active { box-shadow: var(--shadow-btn-h); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
  .topbar { padding: 0 12px; }
  .topbar .brand { width: auto; justify-content: flex-start; padding: 0; }
  .content { padding: calc(var(--topbar-h) + 18px) 16px 44px; }
}
@media (max-width: 575.98px) {
  .card-x .card-x-body, .ucard { padding: 16px; }
  .form-section-body { padding: 6px 16px 18px; }
  .stat { padding: 18px; padding-inline-end: 88px; min-height: 108px; }
  .stat .label i { width: 54px; height: 54px; font-size: 1.35rem; inset-inline-end: 16px; }
  .stat .value { font-size: 1.45rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .dcard-media, .pcard, .dcard, .ucard { transition: none; }
  .dcard:hover .dcard-media { background-size: cover; }
}

/* ---- head-office "viewing this shop" bar: a fixed strip ABOVE the top bar (it used to cover the top bar) ---- */
body:has(> .impersonate-bar) { --imp-h: 34px; }
.impersonate-bar { position: fixed; inset: 0 0 auto 0; height: var(--imp-h); z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; background: var(--citrus-soft); border-bottom: 1px solid var(--citrus-line); color: var(--citrus-ink); font-size: 13px; font-weight: 700; }
.impersonate-bar a { color: var(--citrus-ink); text-decoration: underline; }
.topbar { top: var(--imp-h, 0px); }
.sidebar { top: calc(var(--topbar-h) + var(--imp-h, 0px)); }
.content { padding-top: calc(var(--topbar-h) + var(--imp-h, 0px) + 30px); }
@media (max-width: 991.98px) { .content { padding-top: calc(var(--topbar-h) + var(--imp-h, 0px) + 18px); } }

/* ---- phones: the big icon gives way to the number; the head-office bar may take 2–3 lines; filter buttons wrap ---- */
@media (max-width: 767.98px) {
  body:has(> .impersonate-bar) { --imp-h: 58px; }
  .impersonate-bar { font-size: 11.5px; line-height: 1.25; padding: 4px 12px; overflow: hidden; }
}
@media (max-width: 575.98px) {
  .stat { padding-inline-end: 18px; min-height: 0; }
  .stat .label i { display: none; }
  .stat .value { font-size: 1.3rem !important; overflow-wrap: anywhere; }
  .filter-bar .d-flex.gap-2 { flex-wrap: wrap; }
}
