/* ==========================================================================
   forA Design System & App Shell
   Comprehensive Responsive Styling for Desktop, Tablet, and Mobile
   ========================================================================== */

:root {
  --ink: #000;
  --paper: #fff;
  --stone: #F2F2EF;
  --line: #E2E2DD;
  --mute: #6B6B66;
  --gold: #C9A227;
  --gold-ink: #7A5F00;
  --ok: #1E7B4B;
  --warn: #C26A00;
  --bad: #B3261E;
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 22px;
  --font: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--stone);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  margin-top: 0;
}

.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

td.num, th.num {
  display: table-cell;
  text-align: right;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  font-family: var(--font);
  font-weight: 500;
  border-radius: var(--r-s);
  padding: 0.55rem 1.15rem;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-ink:hover {
  background: #222;
  color: #fff;
}

.btn-gold {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}
.btn-gold:hover {
  background: #b8941f;
  color: #000;
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-line:hover {
  background: var(--ink);
  color: #fff;
}

.btn-line-light {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-line-light:hover {
  background: #fff;
  color: #000;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  min-height: 34px;
}

.btn-danger-line {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad);
}
.btn-danger-line:hover {
  background: var(--bad);
  color: #fff;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-control, .form-select {
  font-family: var(--font);
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  padding: 0.6rem 0.85rem;
  background: #fff;
  min-height: 42px;
  font-size: 0.92rem;
  width: 100%;
}

@media (max-width: 768px) {
  .form-control, .form-select {
    font-size: 16px; /* Prevents auto-zoom on iOS */
  }
}

.form-control:focus, .form-select:focus {
  border-color: var(--ink);
  box-shadow: none;
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  display: block;
}

.form-check-input:checked {
  background-color: var(--ink);
  border-color: var(--ink);
}

.hint {
  color: var(--mute);
  font-size: 0.82rem;
}

/* ==========================================================================
   Alerts & Flash Messages
   ========================================================================== */
.flash {
  border-radius: var(--r-s);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-inline-start: 4px solid;
  background: #fff;
  font-size: 0.92rem;
}
.flash-success { border-color: var(--ok); }
.flash-danger { border-color: var(--bad); }
.flash-warning { border-color: var(--warn); }
.flash-info { border-color: var(--ink); }

/* ==========================================================================
   App Shell & Navigation (Admin / Management)
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  width: 100%;
}

.side {
  background: #000;
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 0;
  z-index: 100;
}

.side .logo {
  padding: 0 1.4rem 1.2rem;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
}

.side .logo img {
  height: 44px;
  width: auto;
}

.side nav {
  padding: 1rem 0.8rem;
  flex: 1;
}

.side a.nl, .side button.nl {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #cfcfcf;
  text-decoration: none;
  border-radius: var(--r-s);
  font-size: 0.9rem;
  position: relative;
  width: 100%;
  background: none;
  border: 0;
  text-align: start;
  font-family: var(--font);
  transition: background 0.15s, color 0.15s;
}

.side a.nl:hover, .side button.nl:hover {
  background: #151515;
  color: #fff;
}

.side a.nl.on {
  background: #151515;
  color: #fff;
}

.side a.nl.on::before {
  content: "";
  position: absolute;
  inset-block: 0.4rem;
  inset-inline-start: -0.8rem;
  width: 4px;
  background: var(--gold);
  border-radius: 0 4px 4px 0;
}

.side .nl i {
  font-size: 1.15rem;
  color: var(--gold);
  flex-shrink: 0;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--stone);
  width: 100%;
}

.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem clamp(0.75rem, 2vw, 1.6rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
}

.top .search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.top .search input {
  padding-inline-start: 2.3rem;
  background: var(--stone);
  border-color: transparent;
  min-height: 38px;
  font-size: 0.88rem;
}

.top .search i {
  position: absolute;
  inset-inline-start: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  font-size: 0.9rem;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn .dot {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  background: var(--gold);
  color: #000;
  border-radius: 99px;
  font-size: 0.68rem;
  padding: 0 0.35rem;
  font-weight: 700;
  line-height: 1.4;
}

.userchip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.menu-btn {
  display: none !important;
}

.scrim {
  display: none !important;
}

/* ==========================================================================
   Responsive Shell (Mobile Phones <= 768px)
   ========================================================================= */
@media (max-width: 768px) {
  .shell {
    display: block;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
  }

  .side {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  html[dir="ltr"] .side {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }

  .side.open {
    transform: translateX(0) !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.6);
  }

  .menu-btn {
    display: inline-flex !important;
  }

  .scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
    display: none !important;
  }

  .scrim.open {
    display: block !important;
  }

  .top .userchip .nm {
    display: none;
  }
}

@media (max-width: 576px) {
  .top {
    padding: 0.5rem 0.75rem;
    gap: 0.45rem;
  }

  .top .search {
    max-width: none;
  }

  .top .search input {
    padding-inline-start: 2rem;
    font-size: 0.8rem;
    min-height: 34px;
  }

  .dropdown .btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
    min-height: 34px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   Page Content Area & Creative Fade Transitions
   ========================================================================== */
@keyframes pageFadeIn {
  0% {
    opacity: 0;
    filter: blur(3px);
  }
  20% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ddFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-progress-bar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), #f0d264, var(--gold));
  z-index: 2000;
  transform-origin: right center;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.page-progress-bar.is-active {
  opacity: 1;
  transform: scaleX(0.85);
}

.page {
  padding: 1.8rem clamp(0.75rem, 2.5vw, 2.2rem) 3.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  animation: pageFadeIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.page.page-leaving {
  animation: none;
  opacity: 0;
  filter: blur(2px);
}

/* Suppliers KPIs & Table Accents */
.sup-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.sup-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #000000;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sup-note-snippet {
  font-size: 0.84rem;
  color: var(--mute);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sup-owed-val {
  color: var(--bad);
  font-weight: 700;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.85rem;
  display: inline-block;
}

@media (max-width: 768px) {
  .sup-kpi-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 1rem 0.75rem 2.5rem;
  }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.page-head h1 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  margin: 0;
}

@media (max-width: 576px) {
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .page-head .d-flex {
    width: 100%;
  }

  .page-head .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   Dashboard Components (Fully Responsive)
   ========================================================================== */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.dash-action-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--r-m);
  border: 1.5px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  min-height: 88px;
}

.dash-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.dash-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.dash-action-card:hover .dash-action-icon {
  transform: scale(1.05);
}

.dash-action-text {
  min-width: 0;
  flex: 1;
}

.dash-action-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.18rem;
}

.dash-action-sub {
  display: block;
  font-size: 0.78rem;
  opacity: 0.72;
  line-height: 1.35;
}

.dash-action-arrow {
  font-size: 1rem;
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.dash-action-card:hover .dash-action-arrow {
  transform: translateX(-4px);
  opacity: 1;
}

.dash-action-ink {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.dash-action-ink .dash-action-icon {
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold);
}

.dash-action-ink:hover {
  background: #141414;
  border-color: var(--gold);
  color: #ffffff;
}

.dash-action-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #000000;
}

.dash-action-gold .dash-action-icon {
  background: rgba(0, 0, 0, 0.12);
  color: #000000;
}

.dash-action-gold:hover {
  background: #b8921d;
  border-color: #b8921d;
  color: #000000;
}

.dash-action-light {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.dash-action-light .dash-action-icon {
  background: var(--stone);
  color: var(--gold-ink);
}

.dash-action-light:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 1100px) {
  .dash-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
}

@media (max-width: 576px) {
  .dash-quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .dash-action-card {
    padding: 0.9rem 0.85rem;
    gap: 0.65rem;
    min-height: 76px;
  }
  .dash-action-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: 9px;
  }
  .dash-action-title {
    font-size: 0.88rem;
  }
  .dash-action-sub,
  .dash-action-arrow {
    display: none;
  }
}

/* KPI Insights Row: 4 cards side-by-side, label above number */
.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.dash-metric-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 1.35rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dash-metric-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.dash-metric-card.has-alert {
  border-color: var(--gold);
}

.dash-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--stone);
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.dash-metric-card.has-alert .dash-metric-icon {
  background: rgba(201, 162, 39, 0.18);
}

.dash-metric-label {
  display: block;
  color: var(--mute);
  font-size: 0.88rem;
  font-weight: 500;
}

.dash-metric-value {
  display: block;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}

@media (max-width: 991px) {
  .dash-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .dash-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .dash-metric-card {
    padding: 1rem 0.7rem;
  }
  .dash-metric-icon {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
  .dash-metric-label {
    font-size: 0.8rem;
  }
  .dash-metric-value {
    font-size: 1.08rem;
  }
}

/* Pie Chart Analytics Card */
.dash-analytics-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: clamp(1.15rem, 2.5vw, 1.6rem);
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.dash-analytics-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.dash-analytics-head h2 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 0 0 0.15rem;
}

.dash-period-tabs {
  display: inline-flex;
  background: var(--stone);
  padding: 0.25rem;
  border-radius: var(--r-s);
  gap: 0.25rem;
}

.dash-period-btn {
  border: 0;
  background: transparent;
  color: var(--mute);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-period-btn:hover {
  color: var(--ink);
}

.dash-period-btn.is-active {
  background: #000000;
  color: #ffffff;
}

.dash-analytics-body {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 2rem;
  align-items: center;
}

.dash-chart-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-chart-box {
  position: relative;
  width: 240px;
  height: 240px;
  max-width: 100%;
  margin: 0 auto;
}

.dash-chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.5rem;
  pointer-events: none;
  color: var(--mute);
  font-size: 0.82rem;
}

.dash-chart-empty i {
  font-size: 1.6rem;
  color: var(--gold-ink);
  opacity: 0.7;
}

.dash-chart-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-breakdown-item {
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 0.95rem 1.1rem;
}

.dash-breakdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dash-breakdown-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.94rem;
}

.dash-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-dot-gold { background: var(--gold); }
.dash-dot-ink { background: #111111; }

.dash-pct {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
}

.dash-breakdown-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.dash-bar {
  height: 8px;
  background: #e4e4de;
  border-radius: 99px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

.dash-bar-gold { background: var(--gold); }
.dash-bar-ink { background: #111111; }

.dash-breakdown-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-top: 1.5px dashed var(--line);
  font-size: 0.94rem;
  color: var(--mute);
}

.dash-breakdown-total strong {
  color: var(--ink);
  font-size: 1.15rem;
}

@media (max-width: 850px) {
  .dash-analytics-body {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
  .dash-chart-box {
    width: 210px;
    height: 210px;
  }
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  margin-bottom: 1.6rem;
  overflow: hidden;
}

.strip div {
  flex: 1 1 160px;
  padding: 0.9rem 1.2rem;
  border-inline-end: 1px solid var(--line);
}

.strip div:last-child {
  border-inline-end: 0;
}

.strip small {
  display: block;
  color: var(--mute);
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.strip b {
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .strip div {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 0.9rem;
  }

  .strip div:nth-child(odd) {
    border-inline-end: 1px solid var(--line);
  }

  .strip div:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .strip b {
    font-size: 1.05rem;
  }
}

.depts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .depts {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.dept {
  border-radius: var(--r-l);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 320px;
  border: 2px solid #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.dept.women {
  background: #000;
  color: #fff;
}

.dept.men {
  background: #fff;
  color: #000;
}

.dept-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.dept.men .dept-badge-icon {
  background: var(--stone);
  color: #000;
}

.dept h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
  font-weight: 700;
}

.dept-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0;
}

.stat-box {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-s);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dept.men .stat-box {
  background: var(--stone);
  border-color: var(--line);
}

.stat-box dt {
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.stat-box dd {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
}

.dept dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin: 0;
}

.dept dt {
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.75;
  margin-bottom: 0.2rem;
}

.dept dd {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  word-break: break-word;
}

.dept .low { color: var(--gold); }
.dept.men .low { color: var(--gold-ink); }
.dept .go { margin-top: auto; }
.dept.off { opacity: 0.45; }

@media (max-width: 850px) {
  .depts {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* ==========================================================================
   Cards & Responsive Tables
   ========================================================================== */
.card-x {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  width: 100%;
}

.tbl-wrap {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.25rem;
}

.tbl {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #fff;
}

.tbl th {
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--mute);
  text-align: start;
  padding: 0.75rem 1rem;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 0.9rem;
}

.tbl tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1.5px solid;
  white-space: nowrap;
}
.pill-ok { color: var(--ok); border-color: var(--ok); }
.pill-off { color: var(--mute); border-color: var(--line); }
.pill-gold { color: var(--gold-ink); border-color: var(--gold); }

/* ==========================================================================
   Filters
   ========================================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.filters .form-control, .filters .form-select {
  width: auto;
  min-width: 150px;
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .filters .form-control, .filters .form-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .filters input[type="search"] {
    grid-column: 1 / -1;
  }

  .filters button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filters {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Pagination & Subtabs
   ========================================================================== */
.pager {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}

.pager a, .pager span {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  text-decoration: none;
  background: #fff;
  font-size: 0.88rem;
  min-width: 36px;
  text-align: center;
}

.pager .cur {
  background: #000;
  color: #fff;
  border-color: #000;
}

.subtabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 1.2rem;
  padding-bottom: 1px;
}

.subtabs a {
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: var(--mute);
  border-bottom: 3px solid transparent;
  margin-bottom: -1.5px;
  font-weight: 500;
  white-space: nowrap;
}

.subtabs a.on {
  color: #000;
  border-color: var(--gold);
}

/* ==========================================================================
   Inventory Navigation Bar & Centered Pages
   ========================================================================== */
.inv-nav-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
  overflow: visible;
}

.inv-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--r-m);
  border: 1.5px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.inv-nav-btn:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
  color: var(--ink);
}

.inv-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--stone);
  color: var(--gold-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.inv-nav-btn.is-active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.inv-nav-btn.is-active .inv-nav-icon {
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold);
}

.inv-nav-btn.is-active:hover {
  border-color: var(--gold);
  color: #ffffff;
}

.inv-center-wrap {
  width: 100%;
  margin: 0 auto;
}

.inv-center-sm {
  max-width: 760px;
}

.inv-center-md {
  max-width: 840px;
}

@media (max-width: 576px) {
  .inv-nav-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }
  .inv-nav-btn {
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
    font-size: 0.83rem;
  }
  .inv-nav-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Department Shoe Catalog Cards & Zero-State Cards
   ========================================================================== */
.dept-shoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.25rem;
}

.dept-shoe-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dept-shoe-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.dept-shoe-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--stone);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.dept-shoe-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dept-shoe-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--mute);
  font-size: 0.84rem;
}

.dept-shoe-placeholder i {
  font-size: 2rem;
  opacity: 0.45;
}

.dept-shoe-stock {
  position: absolute;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
}

.dept-shoe-body {
  padding: 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.dept-shoe-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.dept-shoe-title {
  margin: 0 0 0.1rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.dept-shoe-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-ink);
  white-space: nowrap;
}

.dept-shoe-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dept-spec-tag {
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 0.18rem 0.55rem;
  font-size: 0.76rem;
  color: var(--ink);
}

.dept-shoe-attr {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dept-attr-lbl {
  font-size: 0.78rem;
  color: var(--mute);
  font-weight: 500;
}

.dept-color-list,
.dept-size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dept-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
}

.dept-color-chip .dot {
  margin-inline-end: 0;
}

.dept-size-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 0.18rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.dept-size-chip small {
  font-weight: 400;
  color: var(--mute);
}

.dept-size-chip.is-out {
  opacity: 0.45;
  text-decoration: line-through;
}

.dept-shoe-foot {
  padding: 0.85rem 1.15rem 1.05rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.5rem;
}

.dept-zero-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.dept-zero-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(30, 123, 75, 0.1);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.dept-zero-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  padding-inline-end: 0.85rem;
  border-inline-end: 1.5px solid var(--line);
}

.dept-zero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

/* ==========================================================================
   Product Thumbnails, Chips & Details
   ========================================================================== */
.thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--r-s);
  background: var(--stone) center/cover no-repeat;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.dot {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 1px solid #0003;
  vertical-align: -1px;
  margin-inline-end: 0.35rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.chip > span, .chip.on {
  border: 1.5px solid var(--line);
  border-radius: 99px;
  padding: 0.35rem 0.95rem;
  background: #fff;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  transition: all 0.15s ease;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.chip input:checked + span {
  background: #000;
  color: #fff;
  border-color: #000;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.chip .x {
  border: 0;
  background: none;
  color: var(--bad);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0 0 0.3rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-s);
  background: var(--stone);
}

.gallery.small {
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.bar {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
}

.bar i {
  display: block;
  height: 10px;
  background: #000;
  border-radius: 2px;
  min-width: 2px;
}

.bar b {
  text-align: end;
  font-weight: 500;
}

.vs-wrap {
  position: relative;
}

.vs-list {
  position: absolute;
  z-index: 100;
  inset-inline: 0;
  top: 100%;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: var(--r-m);
  max-height: 260px;
  overflow: auto;
  margin-top: 6px;
  padding: 0.3rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
  animation: ddFadeSlide 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.vs-list button {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: start;
  border: 0;
  background: #fff;
  padding: 0.58rem 0.85rem;
  border-radius: var(--r-s);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vs-list button:hover, .vs-list button.act {
  background: rgba(201, 162, 39, 0.13);
  transform: translateX(-2px);
}

/* ==========================================================================
   Unified Luxury Dropdowns (Bootstrap Menus & Custom Selects)
   ========================================================================== */
.dropdown-menu {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.45rem;
  min-width: 195px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  border-top: 2.5px solid var(--gold);
}

.dropdown-menu.show {
  animation: ddFadeSlide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.dropdown-item {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--r-s);
  padding: 0.52rem 0.85rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(201, 162, 39, 0.14);
  color: #000000;
  transform: translateX(-3px);
}

.dropdown-item.active,
.dropdown-item:active {
  background: #000000;
  color: #ffffff;
}

/* Custom Enhanced Select (.fx-select) */
.fx-select {
  position: relative;
  width: 100%;
}

.fx-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fx-select-btn {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.fx-select.is-sm .fx-select-btn {
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

.fx-select-btn:hover {
  border-color: #b5b5ad;
}

.fx-select.is-open .fx-select-btn,
.fx-select-btn:focus-visible {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
  outline: none;
}

.fx-select-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.fx-select-chev {
  font-size: 0.78rem;
  color: var(--gold-ink);
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-select.is-open .fx-select-chev {
  transform: rotate(180deg);
}

.fx-select-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 1080;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-top: 2.5px solid var(--gold);
  border-radius: var(--r-m);
  padding: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  display: none;
}

.fx-select.is-open .fx-select-menu {
  display: block;
  animation: ddFadeSlide 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-select.drop-up .fx-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.fx-select-opt {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: start;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.fx-select-opt:hover:not(:disabled) {
  background: rgba(201, 162, 39, 0.13);
  transform: translateX(-2px);
}

.fx-select-opt.is-selected {
  background: #000000;
  color: #ffffff;
}

.fx-select-opt.is-selected i {
  color: var(--gold);
}

.fx-select-opt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filters .fx-select {
  width: auto;
  min-width: 155px;
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .filters .fx-select {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ==========================================================================
   POS Cashier (Responsive for Touch & Desktops)
   ========================================================================== */
.pos-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pos-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.22rem 0.75rem;
  font-size: 0.78rem;
  color: var(--mute);
}

.pos-meta-pill.is-gold {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: rgba(201, 162, 39, 0.08);
}

.pos {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.35rem;
  align-items: start;
}

.pos-bar-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pos-bar {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pos-filter-group {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 0.6rem;
}

.pos-input-icon {
  position: relative;
}

.pos-input-icon > i {
  position: absolute;
  inset-inline-start: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute);
  font-size: 1rem;
  pointer-events: none;
}

.pos-input-icon .form-control {
  padding-inline-start: 2.5rem;
}

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.85rem;
}

.pos-empty-grid {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.pos-empty-grid i {
  font-size: 2rem;
  color: var(--gold-ink);
  opacity: 0.7;
}

.pcard-pos {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  padding: 0.7rem;
  text-align: start;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}

.pcard-pos:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.pcard-pos .im {
  aspect-ratio: 1;
  background: var(--stone) center/cover no-repeat;
  border-radius: var(--r-s);
  margin-bottom: 0.55rem;
}

.pcard-pos .im.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
  font-size: 1.6rem;
}

.pcard-pos .n {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.pos-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.pcard-pos .p {
  color: var(--gold-ink);
  font-weight: 700;
  font-size: 0.92rem;
}

.pos-avail {
  font-size: 0.74rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  background: var(--stone);
  color: var(--ok);
  font-weight: 600;
}

.pos-avail.out {
  color: var(--mute);
}

.pos-cart {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pos-cart-card {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pos-sec-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pos-sec-title i {
  color: var(--gold-ink);
}

.pos-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 0.75rem;
  text-align: center;
  color: var(--mute);
  font-size: 0.85rem;
}

.pos-empty-cart i {
  font-size: 1.65rem;
  opacity: 0.5;
}

.pos-pay-btn {
  min-height: 48px;
  box-shadow: 0 6px 16px rgba(201, 162, 39, 0.28);
}

.cart-lines .cl {
  background: var(--stone);
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  padding: 0.65rem;
  margin-bottom: 0.5rem;
}

.cart-lines .cl.warn {
  border-color: var(--warn);
}

.tot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.tot.grand {
  border-top: 1.5px solid #000;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .pos {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem;
  }

  .pos-cart {
    position: static;
    max-height: none;
    width: 100%;
  }

  .pos-filter-group {
    grid-template-columns: 1fr 1fr;
  }

  .pos-q-wrap {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .pos-filter-group {
    grid-template-columns: 1fr;
  }

  .pos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
}

/* ==========================================================================
   Auth Screens
   ========================================================================== */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
}

.auth-brand img {
  width: min(80%, 420px);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 4px;
  background: var(--gold);
}

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: #fff;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.pw-wrap {
  position: relative;
}

.pw-wrap button {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border: 0;
  background: none;
  padding: 0 0.9rem;
  color: var(--mute);
  cursor: pointer;
}

@media (max-width: 820px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .auth-brand {
    padding: 2.5rem 1.5rem;
    min-height: 200px;
  }

  .auth-brand img {
    max-height: 70px;
    width: auto;
  }

  .auth-brand::after {
    inset-block: auto 0;
    inset-inline: 0;
    width: auto;
    height: 4px;
  }

  .auth-form {
    padding: 2.5rem 1.25rem;
    flex: 1;
  }
}

/* ==========================================================================
   Modals & Accessibility
   ========================================================================== */
.modal-dialog {
  margin: 1rem;
}

/* ==========================================================================
   Luxury Coming Soon Card (Online Store)
   ========================================================================== */
.soon-wrap {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.soon-card {
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}

.soon-hero {
  background: #000000;
  color: #ffffff;
  padding: clamp(2rem, 4vw, 3rem) 1.75rem;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}

.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 99px;
  padding: 0.3rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.soon-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
}

.soon-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.65rem;
  color: #ffffff;
}

.soon-hero p {
  margin: 0 auto;
  max-width: 520px;
  color: #cfcfc8;
  font-size: 0.94rem;
}

.soon-body {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.soon-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.soon-feature-item {
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 1.1rem 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  font-weight: 500;
}

.soon-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--gold-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.soon-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .soon-features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (min-width: 576px) {
  .modal-dialog {
    margin: 1.75rem auto;
  }
}

@media (min-width: 769px) {
  body.has-shell .modal {
    inset-inline-start: 272px;
    inset-inline-end: 0;
    width: calc(100% - 272px);
  }
}

@media print {
  .side, .top, .no-print, .inv-nav-bar, .filters {
    display: none !important;
  }
  .shell {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}


/* Inventory balance: fit desktop width; show labeled cards on smaller screens. */
.inventory-stock-wrap { overflow: visible; }
.inventory-stock-table, .inventory-summary-table { min-width: 0; width: 100%; table-layout: fixed; }
.inventory-stock-table th, .inventory-stock-table td, .inventory-summary-table td {
  padding: .55rem .35rem; white-space: normal; overflow-wrap: anywhere;
}
.inventory-stock-table th:first-child { width: 34px; }
.inventory-stock-table th:nth-child(2), .inventory-stock-table th:nth-child(3), .inventory-stock-table th:nth-child(6) { width: 11%; }
.inventory-stock-table .pill { white-space: normal; padding-inline: .35rem; }
@media (max-width: 1199px) {
  .inventory-stock-wrap { background: transparent; border: 0; }
  .inventory-stock-table, .inventory-stock-table tbody { display: block; background: transparent; }
  .inventory-stock-table thead { display: block; margin-bottom: .5rem; }
  .inventory-stock-table thead tr { display: flex; align-items: center; }
  .inventory-stock-table thead th { display: none; }
  .inventory-stock-table thead th:first-child { display: flex; align-items: center; gap: .5rem; width: auto; border: 0; }
  .inventory-stock-table thead th:first-child::after { content: 'تحديد الكل'; }
  .inventory-stock-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .8rem; padding: .8rem; margin-bottom: .65rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); }
  .inventory-stock-table tbody td, .inventory-stock-table tbody td.num { display: block; min-width: 0; text-align: start; direction: rtl; border: 0; padding: .2rem 0; }
  .inventory-stock-table tbody td::before { content: attr(data-label); display: block; color: var(--mute); font-size: .75rem; margin-bottom: .15rem; }
  .inventory-stock-table tbody td:nth-child(2) { font-weight: 600; }
  .inventory-stock-table tbody td:nth-child(6) { direction: ltr; text-align: right; }
}
