/* ════════════════════════════════════════════════════════════════
   SUPERMARKET BILLING — COMPLETE THEME v3
   Brand: Violet + Orange accent | Dark indigo sidebar | Warm white bg
   ════════════════════════════════════════════════════════════════ */

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

:root {
  /* Default Theme Variables */
  --theme-primary:        #0d6efd;
  --theme-primary-dark:   #0b5ed7;
  --theme-primary-light:  #cfe2ff;
  --theme-accent:         #f97316;
  --sidebar-bg:           #0f172a;

  /* Brand Aliases & Fallbacks */
  --brand:        var(--theme-primary, #0d6efd);
  --brand-dark:   var(--theme-primary-dark, #0b5ed7);
  --brand-light:  var(--theme-primary-light, #cfe2ff);
  --brand-glow:   rgba(13, 110, 253, 0.18);
  --accent:       var(--theme-accent, #f97316);
  --accent-light: #fff7ed;

  /* Neutrals */
  --ink:     var(--theme-text, #1a1235);
  --muted:   #6b7280;
  --bg:      var(--theme-bg, #f7f6fb);
  --border:  #e8e4f3;
  --white:   #ffffff;

  /* Sidebar */
  --sb-from: var(--sidebar-bg);
  --sb-mid:  var(--sidebar-bg);
  --sb-to:   var(--sidebar-bg);
  --sb-text: #a89dd8;
  --sb-hover-bg: var(--brand-glow);
  --sb-active-bg: var(--brand-glow);
  --sb-active-border: var(--brand);

  /* Surface & shadows */
  --radius:    8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow-xs: 0 1px 2px rgba(26,18,53,.04);
  --shadow-sm: 0 2px 8px rgba(26,18,53,.06), 0 1px 2px rgba(26,18,53,.04);
  --shadow-md: 0 4px 16px rgba(26,18,53,.08), 0 1px 4px rgba(26,18,53,.04);
  --shadow-lg: 0 12px 36px rgba(26,18,53,.12), 0 4px 8px rgba(26,18,53,.06);
}

/* ── Reset ── */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  animation: bodyFade .3s ease both;
}
h1,h2,h3,h4,h5 { letter-spacing: -.02em; }
@keyframes bodyFade { from{opacity:0} to{opacity:1} }

/* ════════════════════════════════
   LAYOUT
   ════════════════════════════════ */
.app-shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--sb-from) 0%, var(--sb-mid) 50%, var(--sb-to) 100%);
  color: var(--sb-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 0 0 24px;
  border-right: 1px solid rgba(255,255,255,.04);
}
/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--brand-glow); border-radius: 4px; }

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 800; color: #fff;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--brand-glow);
  margin-bottom: 8px;
  letter-spacing: -.03em;
}
.sidebar-brand i {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--theme-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
  box-shadow: 0 4px 12px var(--brand-glow);
  flex-shrink: 0;
}
.sidebar-logo { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }

.sidebar-nav { display: flex; flex-direction: column; padding: 0 10px; }
.nav-section {
  padding: 14px 8px 5px;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(168,157,216,.35);
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 10px; margin-bottom: 1px;
  color: var(--sb-text); text-decoration: none; font-size: 12.5px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: all .18s ease;
}
.sidebar-nav a i { font-size: 14px; width: 16px; text-align: center; opacity: .85; }
.sidebar-nav a:hover {
  background: var(--sb-hover-bg);
  color: #fff;
  padding-left: 14px;
}
.sidebar-nav a.active {
  background: var(--sb-active-bg);
  color: #fff;
  border-left-color: var(--sb-active-border);
  font-weight: 700;
}
.sidebar-nav a.active i { color: var(--sidebar-icon-color, #c4b5fd); }

/* ── MAIN AREA ── */
.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ── TOPBAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(26,18,53,.05);
}
.topbar-title { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.topbar-user-pill {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border);
  padding: 6px 12px 6px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  transition: background .15s;
}
.topbar-user-pill:hover { background: var(--brand-light); color: var(--brand-dark); }
.topbar-user-pill i { font-size: 16px; color: var(--brand); }

/* Badge variants */
.badge-admin {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 2px 8px var(--brand-glow);
}
.badge-super {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge-cashier {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .06em; text-transform: uppercase;
}

/* ── CONTENT ── */
.content {
  padding: 20px 24px 32px;
  flex: 1; max-width: 1440px; width: 100%; margin: 0 auto;
}

/* ════════════════════════════════
   ANIMATIONS
   ════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(20px) scale(.99); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes iconFloat {
  0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)}
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 var(--brand-glow); }
  70%  { box-shadow: 0 0 0 6px var(--brand-glow); }
  100% { box-shadow: 0 0 0 0 var(--brand-glow); }
}

.content > *:nth-child(1) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 0ms; }
.content > *:nth-child(2) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 80ms; }
.content > *:nth-child(3) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 160ms; }
.content > *:nth-child(4) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 240ms; }
.content > *:nth-child(5) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 310ms; }

.stat-grid > *:nth-child(1) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 0ms; }
.stat-grid > *:nth-child(2) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 80ms; }
.stat-grid > *:nth-child(3) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 160ms; }
.stat-grid > *:nth-child(4) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 240ms; }
.pos-layout > *:nth-child(1) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 0ms; }
.pos-layout > *:nth-child(2) { animation: fadeInUp .5s cubic-bezier(.16,.84,.44,1) both 120ms; }
.stat-card .stat-icon { animation: iconFloat 3.5s ease-in-out infinite; }

.sidebar-nav a { animation: fadeIn .4s ease both; }
.sidebar-nav a:hover { transform: none; }
.sidebar-brand { animation: fadeIn .3s ease both; }
.guest-card { animation: fadeInUp .6s cubic-bezier(.16,.84,.44,1) both; }

a, .btn, .sidebar-nav a, .topbar-user-pill {
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .12s;
}
a.btn-primary:active, .btn-secondary:active { transform: scale(.96); }
a.btn-primary:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .content > *, .stat-grid > *, .pos-layout > *, .stat-card .stat-icon,
  .sidebar-nav a, .sidebar-brand, body, .guest-card { animation: none !important; }
  * { transition: none !important; }
}

/* ════════════════════════════════
   CARDS (global)
   ════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card-header { font-weight: 700; background: transparent; }
.card-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.card-title-row h3 { font-size: 15px; font-weight: 800; margin: 0; color: var(--ink); }
.card > h3 {
  font-size: 17px; font-weight: 800; margin: 0 0 20px; color: var(--ink);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.card-header-row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border);
}
.card-header-row h3 { font-size: 17px; font-weight: 800; margin: 0; color: var(--ink); }

/* ════════════════════════════════
   STAT CARDS
   ════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
@media(max-width:992px){.stat-grid{grid-template-columns:repeat(2,1fr);}}
@media(max-width:576px){.stat-grid{grid-template-columns:1fr;}}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-a, var(--brand)), var(--accent-b, var(--brand)));
}
.stat-card.grad-blue   { --accent-a:#3b82f6; --accent-b:#60a5fa; }
.stat-card.grad-green  { --accent-a:#10b981; --accent-b:#34d399; }
.stat-card.grad-purple { --accent-a:var(--theme-primary); --accent-b:#a78bfa; }
.stat-card.grad-amber  { --accent-a:#f59e0b; --accent-b:#fbbf24; }
.stat-card.stat-danger { --accent-a:#ef4444; --accent-b:#f87171; }
.stat-card.stat-info   { --accent-a:#3b82f6; --accent-b:#60a5fa; }
.stat-card.stat-warning .stat-sub { color:#b45309; }

.stat-card .stat-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  background: linear-gradient(135deg, var(--accent-a, var(--brand)), var(--accent-b, var(--brand)));
  color: #fff; margin-bottom: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.stat-label { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing:.05em; }
.stat-value { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.stat-sub   { font-size: 11px; color: var(--muted); display:flex; align-items:center; gap:5px; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  display: inline-block; box-shadow: 0 0 0 0 var(--brand-glow);
  animation: livePulse 2s infinite;
}

/* ════════════════════════════════
   DASH GRID / HEADER
   ════════════════════════════════ */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
@media(max-width:992px){.dash-grid{grid-template-columns:1fr;}}

.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.dash-header h2 { font-size: 15px; font-weight: 800; margin: 0 0 3px; color: var(--ink); }
.dash-header p  { margin: 0; color: var(--muted); font-size: 12px; }
.dash-date-pill {
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow-xs); white-space: nowrap;
}

/* ════════════════════════════════
   BADGES
   ════════════════════════════════ */
.badge-soft { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing:.02em; }
.badge-soft.blue  { background: #eff6ff; color: #1d4ed8; }
.badge-soft.amber { background: #fffbeb; color: #b45309; }
.badge-soft.green { background: #ecfdf5; color: #059669; }

/* ════════════════════════════════
   TABLES
   ════════════════════════════════ */
.table { --bs-table-hover-bg: #faf9fe; margin-bottom: 0; }
.table thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing:.04em;
  color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: #faf9fe;
  padding: 10px 14px;
}
.table td, .table th { vertical-align: middle; padding: 11px 14px; }
.table td { border-color: var(--border); }
.table-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow: hidden;
}
.table-card > .table-responsive {
  margin: 0; border: none;
}
.table > :not(caption) > * > * { padding: 11px 14px; }
.table thead th:last-child, .table tbody td:last-child { width:1%; white-space:nowrap; text-align:right; }
.table thead th:first-child, .table tbody td:first-child { width: auto; }

/* Empty State */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.empty-state i {
  font-size: 32px;
  color: #d1d5db;
}
.empty-state-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.empty-state-text {
  font-size: 13px;
  margin: 0;
  max-width: 300px;
}

/* ════════════════════════════════
   BUTTONS
   ════════════════════════════════ */
.btn { border-radius: var(--radius-sm) !important; font-weight: 700; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
.btn-primary { background: var(--brand) !important; border-color: var(--brand) !important; color:#fff !important; }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark) !important; border-color: var(--brand-dark) !important; }
.btn-outline-primary { color: var(--brand) !important; border-color: var(--brand) !important; }
.btn-outline-primary:hover { background: var(--brand) !important; color:#fff !important; }

a.btn-primary, a.btn.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #fff !important;
  border: none; padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; text-decoration: none;
  box-shadow: 0 3px 10px var(--brand-glow); white-space: nowrap;
}
a.btn-primary:hover, a.btn.btn-primary:hover {
  background: var(--brand-dark); color: #fff !important;
}
.btn-secondary {
  background: var(--ink); border: none; color: #fff;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-secondary:hover { background: #2d1f6e; }
.btn-link { color: var(--brand); font-weight: 700; font-size: 13px; text-decoration: none; }
.btn-link:hover { color: var(--brand-dark); text-decoration: underline; }
.btn-view-link {
  color: var(--brand-dark); font-weight: 700; font-size: 12px; text-decoration: none;
  background: var(--brand-light); padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.btn-view-link:hover { background: var(--brand); color: #fff; }
.btn-block { width: 100%; display: block; }

/* Table row actions */
.table td a:not(.btn):not(.btn-view-link):not(.chip-row),
.table td .btn-secondary {
  color: var(--brand-dark); font-weight: 700; font-size: 12px; text-decoration: none;
  background: var(--brand-light); padding: 5px 12px; border-radius: 999px; margin-right: 6px;
  display: inline-block;
}
.table td a:not(.btn):not(.btn-view-link):not(.chip-row):hover,
.table td .btn-secondary:hover { background: var(--brand); color: #fff; }
.table td form { display: inline-block; }
.table td button.btn-link, .table td button.btn-link.text-danger {
  color: #dc2626; font-weight: 700; font-size: 12px; background: #fef2f2;
  border: none; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.table td button.btn-link:hover { background: #dc2626; color: #fff; }

/* ════════════════════════════════
   STATUS BADGES
   ════════════════════════════════ */
.status-active, .status-inactive { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-active   { background: #ecfdf5; color: #059669; }
.status-inactive { background: #fef2f2; color: #dc2626; }
.badge-low-stock { background: #fef3c7; color: #92400e; }
.badge-active    { background: var(--theme-primary-light); color: var(--theme-primary-dark); }
.badge-inactive  { background: #fee2e2; color: #991b1b; }

/* ════════════════════════════════
   ALERTS
   ════════════════════════════════ */
.alert { border-radius: var(--radius-sm); border: none; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger  { background: #fff1f2; color: #be123c; }

/* ════════════════════════════════
   FORMS
   ════════════════════════════════ */
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-size: 13.5px; background: #faf9fe; color: var(--ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); background: #fff;
}
.form { max-width: 720px; }
.form-row { display: flex; gap: 18px; flex-wrap: wrap; }
.form-row .form-group { flex: 1 1 200px; min-width: 0; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input:not([type]),
.form-group select,
.form-group textarea {
  width:100%; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:14px; background:#faf9fe; color:var(--ink); font-family:inherit;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:var(--brand); background:#fff; box-shadow:0 0 0 3px var(--brand-glow);
}
.form-group select { appearance: auto; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group.form-check label { display:flex; align-items:center; gap:8px; font-weight:600; cursor:pointer; margin-bottom:0; }
.form-group.form-check input[type="checkbox"] { width:17px; height:17px; accent-color:var(--brand); cursor:pointer; }
.form button.btn-primary, .form button[type="submit"] {
  display:inline-flex; align-items:center; gap:6px; background:var(--brand); color:#fff;
  border:none; padding:11px 22px; border-radius:var(--radius-sm); font-size:14px; font-weight:700;
  cursor:pointer; box-shadow:0 3px 10px var(--brand-glow); margin-top:4px;
  transition: background-color .15s, transform .1s;
}
.form button.btn-primary:hover, .form button[type="submit"]:hover { background:var(--brand-dark); }
.form button.btn-primary:active, .form button[type="submit"]:active { transform:scale(.96); }
.form .btn-link { margin-left:12px; }
.form .text-danger, .invalid-feedback { display:block; color:#dc2626; font-size:12.5px; font-weight:600; margin-top:6px; }
.form-group input.is-invalid, .form-group select.is-invalid { border-color:#dc2626; background:#fef2f2; }

/* ════════════════════════════════
   FILTER BAR
   ════════════════════════════════ */
.filter-bar {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding-bottom:18px; margin-bottom:18px; border-bottom:1px solid var(--border);
}
.filter-bar input[type="date"], .filter-bar input[type="text"] {
  padding:9px 12px; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:13px; background:#faf9fe; color:var(--ink); min-width:160px;
}
.filter-bar input:focus { outline:none; border-color:var(--brand); background:#fff; box-shadow:0 0 0 3px var(--brand-glow); }
.filter-label { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--muted); }
.card-header-row .filter-bar { border-bottom:none; padding-bottom:0; margin-bottom:0; }

/* ════════════════════════════════
   PAGINATION
   ════════════════════════════════ */
.pagination-wrap { 
  display: flex; justify-content: space-between; align-items: center; 
  padding: 12px 20px; 
  border-top: 1px solid var(--border);
  background: #fff;
}
@media (max-width: 576px) {
  .pagination-wrap { flex-direction: column; gap: 12px; }
}
.pagination-wrap nav { width: 100%; }
.pagination-wrap nav > div:first-child { display:none; }
.pagination-wrap .pagination { gap:4px; margin: 0; }
.pagination-wrap .page-link {
  border:1px solid var(--border); color:var(--ink); border-radius:6px !important;
  margin:0 2px; font-size:13px; font-weight:600; padding: 4px 10px;
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
}
.pagination-wrap .page-item.active .page-link { background:var(--brand); border-color:var(--brand); color:#fff; }
.pagination-wrap .page-link:hover { background:var(--brand-light); border-color:var(--brand); }
.pagination .page-link { border-radius:6px; margin:0 2px; font-weight:600; color:var(--brand); }
.pagination .page-item.active .page-link { background:var(--brand); border-color:var(--brand); }

/* Custom overrides for default Tailwind pagination layout and chevrons */
nav[role="navigation"] svg {
  width: 18px !important;
  height: 18px !important;
  display: inline-block;
  vertical-align: middle;
}
nav[role="navigation"] .flex.items-center.justify-between,
nav[role="navigation"] .hidden.sm\:flex-1 {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}
nav[role="navigation"] .flex-1.sm\:hidden {
  display: none !important;
}
nav[role="navigation"] span.relative.z-0.inline-flex {
  display: inline-flex !important;
  gap: 4px;
}
nav[role="navigation"] span.relative.z-0.inline-flex > a,
nav[role="navigation"] span.relative.z-0.inline-flex > span,
nav[role="navigation"] span.relative.z-0.inline-flex > span > span,
nav[role="navigation"] span.relative.z-0.inline-flex > span > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px !important;
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
  background: #fff;
  transition: all 0.2s ease;
}
nav[role="navigation"] span.relative.z-0.inline-flex > span[aria-current="page"] > span {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
nav[role="navigation"] p.text-sm.text-gray-700 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ════════════════════════════════
   GUEST / LOGIN
   ════════════════════════════════ */
.guest-body {
  display:flex; align-items:center; justify-content:center;
  min-height:100vh;
  background: radial-gradient(ellipse at top left, #1a0a3c 0%, var(--sidebar-bg) 60%, #1a0533 100%);
}
.guest-card { background:#fff; padding:36px; border-radius:var(--radius); width:390px; box-shadow:0 24px 60px rgba(0,0,0,.35); }
.guest-brand { display:flex; align-items:center; justify-content:center; gap:9px; font-size:20px; font-weight:800; margin-bottom:24px; color:var(--ink); letter-spacing:-.03em; }
.guest-brand i { color:var(--brand); font-size:22px; }

/* ════════════════════════════════
   POS SCREEN
   ════════════════════════════════ */
.pos-layout { display:grid; grid-template-columns: var(--pos-left-width, 60%) var(--pos-right-width, 40%) !important; gap:20px; align-items: stretch !important; height: calc(100vh - 120px) !important; }
@media(max-width:992px){.pos-layout{grid-template-columns:1fr;}}
.pos-products { background:var(--white); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow-sm); border:1px solid var(--border); }
.input-search {
  width:100%; padding:11px 16px; border:1px solid var(--border); border-radius:var(--radius-sm);
  font-size:14px; margin-bottom:18px; background:#faf9fe; color:var(--ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.input-search:focus { outline:none; border-color:var(--brand); background:#fff; box-shadow:0 0 0 3px var(--brand-glow); }
.product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.product-tile {
  border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px; cursor:pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s; background:var(--white);
}
.product-tile:hover { border-color:var(--brand); box-shadow:var(--shadow-md); transform:translateY(-3px); }
.product-tile:active { transform:translateY(-1px) scale(.98); }
.product-tile-name { font-weight:700; font-size:13px; margin-bottom:8px; color:var(--ink); line-height:1.3; min-height:34px; }
.product-tile-price { color:var(--brand-dark); font-weight:800; font-size:15px; }
.product-tile-stock { font-size:11px; color:var(--muted); margin-top:4px; }
.pos-cart {
  background:var(--white); border-radius:var(--radius); padding:22px;
  box-shadow:var(--shadow-sm); border:1px solid var(--border); position:sticky; top:90px;
}
.pos-cart h3 { font-size:16px; font-weight:800; margin:0 0 16px; color:var(--ink); }
#cartTable { font-size:13px; margin-bottom:4px; }
#cartTable thead th { font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; border-bottom:1px solid var(--border); padding:0 6px 8px; }
#cartTable td { padding:10px 6px; border-bottom:1px solid var(--border); vertical-align:middle; }
#cartTable #emptyRow td { text-align:center; color:var(--muted); padding:24px 6px; border-bottom:none; }
#cartTable td button { width:22px; height:22px; border-radius:6px; border:1px solid var(--border); background:#faf9fe; color:var(--ink); font-weight:700; cursor:pointer; line-height:1; }
#cartTable td button:hover { background:var(--brand-light); border-color:var(--brand); }
.pos-summary { border-top:1px solid var(--border); padding-top:14px; margin-top:6px; }
.summary-row { display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--muted); padding:6px 0; }
.summary-row.total-row { border-top:1px dashed var(--border); margin-top:6px; padding-top:12px; font-size:16px; font-weight:800; color:var(--ink); }
.input-inline { width:100px; padding:6px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); text-align:right; font-size:13px; background:#faf9fe; }
.input-inline:focus { outline:none; border-color:var(--brand); background:#fff; }
.pos-cart .form-group { margin:14px 0; }
.pos-cart .form-group label { display:block; font-size:11px; font-weight:700; color:var(--muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:.03em; }
.pos-cart .form-group input, .pos-cart .form-group select { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:14px; background:#faf9fe; color:var(--ink); }
.pos-cart .form-group input:focus, .pos-cart .form-group select:focus { outline:none; border-color:var(--brand); background:#fff; box-shadow:0 0 0 3px var(--brand-glow); }
.pos-cart #checkoutBtn { margin-top:6px; padding:13px; font-size:15px; font-weight:700; border-radius:var(--radius-sm); border:none; box-shadow:0 4px 12px var(--brand-glow); }
.pos-cart #checkoutBtn:disabled { opacity:.5; box-shadow:none; cursor:not-allowed; }

/* ════════════════════════════════
   QUICK ACTION TILES
   ════════════════════════════════ */
.qa-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media(max-width:1440px){.qa-grid{grid-template-columns: repeat(4, 1fr);}}
@media(max-width:992px){.qa-grid{grid-template-columns: repeat(2, 1fr);}}
@media(max-width:576px){.qa-grid{grid-template-columns: 1fr;}}
.qa-tile {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; padding:16px 10px; border-radius:12px; text-decoration:none; text-align:center;
  border:1.5px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s;
  position:relative; overflow:hidden;
}
.qa-tile:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.10); }
.qa-tile:active { transform:scale(.98); }
.qa-icon { width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; transition:transform .2s; }
.qa-tile:hover .qa-icon { transform:scale(1.12); }
.qa-label { font-size:13px; font-weight:700; line-height:1.1; }
.qa-sub   { font-size:11px; opacity:.65; line-height:1; }
.qa-pos, .qa-purchase, .qa-product, .qa-customer { 
  background: var(--bg); border-color: var(--border); color: var(--ink); 
}
.qa-pos .qa-icon, .qa-purchase .qa-icon, .qa-product .qa-icon, .qa-customer .qa-icon { 
  background: linear-gradient(135deg, var(--brand), var(--theme-accent)); color: #fff; box-shadow: 0 4px 12px var(--brand-glow); 
}
.qa-pos:hover, .qa-purchase:hover, .qa-product:hover, .qa-customer:hover { 
  border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); 
}

/* ════════════════════════════════
   MISC HELPERS
   ════════════════════════════════ */
.text-brand { color:var(--brand) !important; }
.rounded-xl { border-radius:var(--radius) !important; }
.shadow-soft { box-shadow:var(--shadow-xs) !important; }
.chip-row { display:inline-flex; align-items:center; gap:8px; text-decoration:none; color:var(--ink); font-weight:700; }
.avatar-dot { width:26px; height:26px; border-radius:50%; background:var(--brand-light); color:var(--brand-dark); display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; flex-shrink:0; }
.stock-bar-track { width:100%; max-width:140px; height:5px; background:#f1f5f9; border-radius:999px; margin-top:6px; overflow:hidden; }
.stock-bar-fill  { height:100%; background:linear-gradient(90deg,var(--brand),var(--accent)); border-radius:999px; }
.chart-card .chart-wrap { position:relative; height:280px; }

/* ════════════════════════════════
   RESPONSIVE SIDEBAR
   ════════════════════════════════ */
@media(max-width:991px){
  .sidebar {
    position:fixed; top:0; left:0; bottom:0;
    z-index:1000; transform:translateX(-100%);
    transition:transform .3s ease; width:240px;
  }
  .sidebar.show { transform:translateX(0); box-shadow:6px 0 30px rgba(0,0,0,.35); }
  .main-area { width:100%; }
}

/* ════════════════════════════════════════════════════════════════
   GLOBAL UI STANDARDIZATION OVERRIDES
   ════════════════════════════════════════════════════════════════ */

/* ── Typography & Font Sizing ── */


/* ── Sidebar icon sizing handled by Compact Sidebar Redesign section below ── */


.topbar {
  height: 56px !important;
  padding: 0 24px !important;
  display: flex;
  align-items: center;
}

.topbar-title {
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Icon Sizing Overrides ── */
.table td a i, .table td button i, .btn i, .topbar i, .hd-card-header i, .sa-card-head i {
  font-size: 16px !important;
}

/* ── POS Sizing Overrides ── */
.pos-toolbar {
  border-radius: 8px !important;
  padding: 10px 14px !important;
}

.pos-btn-tool {
  height: 38px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pos-products-panel, .pos-cart-panel {
  border-radius: 8px !important;
  padding: 20px !important;
}

.pos-cart-table thead th {
  font-size: 12px !important;
  padding: 10px 12px !important;
}

.pos-cart-table tbody td {
  font-size: 14px !important;
  padding: 10px 12px !important;
}

.pos-btn-primary.btn-block {
  height: 42px !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.btn-icon-circle, .btn-icon-circle:hover {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ── Compact Sidebar Redesign ── */
.sidebar {
  width: 240px !important;
  background: var(--sidebar-bg, var(--sidebar-bg)) !important; /* Premium dark background */
  color: #94a3b8 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-brand {
  padding: 16px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.sidebar-brand i, .sidebar-brand img, .sidebar-logo {
  width: 24px !important; /* Shrunk logo by ~20% */
  height: 24px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar-brand span {
  font-size: 18px !important; /* App name 18px */
  font-weight: 500 !important; /* Medium weight */
  color: #f8fafc !important;
}

.sidebar-nav {
  padding: 0 8px !important;
}

.nav-section {
  font-size: 11px !important; /* Heading 11px */
  font-weight: 600 !important; /* Weight 600 */
  letter-spacing: 1px !important; /* Spacing 1px */
  color: #64748b !important; /* Light gray */
  padding: 12px 12px 6px !important;
  text-transform: uppercase !important;
}

.sidebar-nav a {
  height: 42px !important; /* Height 42px */
  padding: 0 12px !important; /* Reduced padding */
  font-size: 14px !important; /* Font size 14px */
  font-weight: 500 !important; /* Medium weight */
  color: #94a3b8 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-left: none !important; /* Remove thick block */
  margin-bottom: 2px !important; /* Reduced vertical spacing */
  transition: all 0.15s ease !important;
}

.sidebar-nav a i {
  font-size: 18px !important; /* Icon size 18px */
  width: 18px !important;
  height: 18px !important;
  opacity: 0.8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover-bg, rgba(255, 255, 255, 0.04)) !important;
  color: #f8fafc !important;
  padding-left: 12px !important; /* Stop aggressive slide-indent */
}

.sidebar-nav a.active {
  background: var(--sidebar-active-bg, rgba(255, 255, 255, 0.08)) !important; /* Clean active background */
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important; /* Subtle active shadow */
  font-weight: 500 !important;
}

.sidebar-nav a.active i {
  color: var(--sidebar-icon-color, #6366f1) !important; /* Highlight active menu icon */
}

/* ── Super Admin Official Theme & Sidebar (Matching Reference Screenshot) ── */
.superadmin-sidebar {
  width: 240px !important;
  background: var(--sidebar-bg) !important;
  color: var(--theme-primary-light) !important;
  border-right: 1px solid var(--brand-glow) !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  overflow-y: auto !important;
  padding: 0 0 24px !important;
}

.superadmin-sidebar .sidebar-brand {
  padding: 20px 16px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.superadmin-sidebar .sidebar-brand .sidebar-logo-box,
.superadmin-sidebar .sidebar-brand i {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent)) !important;
  box-shadow: 0 0 16px var(--brand-glow) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
}

.superadmin-sidebar .sidebar-brand span {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}

.superadmin-sidebar .sidebar-nav {
  padding: 0 10px !important;
}

.superadmin-sidebar .nav-section {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--theme-primary-light) !important;
  opacity: 0.6 !important;
  padding: 14px 10px 6px !important;
}

.superadmin-sidebar .sidebar-nav a {
  height: 40px !important;
  padding: 0 12px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--theme-primary-light) !important;
  border-radius: 8px !important;
  margin-bottom: 2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease !important;
}

.superadmin-sidebar .sidebar-nav a i {
  font-size: 16px !important;
  width: 18px !important;
  text-align: center !important;
  color: var(--theme-accent) !important;
  opacity: 0.9 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.superadmin-sidebar .sidebar-nav a:hover {
  background: var(--sidebar-hover-bg) !important;
  color: #ffffff !important;
  padding-left: 14px !important;
}

.superadmin-sidebar .sidebar-nav a:hover i {
  color: #ffffff !important;
}

.superadmin-sidebar .sidebar-nav a.active {
  background: var(--sidebar-active-bg) !important;
  border: 1px solid var(--theme-primary) !important;
  box-shadow: 0 0 14px var(--brand-glow) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.superadmin-sidebar .sidebar-nav a.active i {
  color: #ffffff !important;
}

.superadmin-sidebar::-webkit-scrollbar-thumb {
  background: var(--brand-glow) !important;
  border-radius: 4px !important;
}


.pos-cart-panel {
  min-width: var(--pos-cart-min-width, 400px) !important;
  max-width: var(--pos-cart-max-width, 520px) !important;
  width: 100% !important;
  height: 100% !important;
}
.pos-cart-table {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
.pos-cart-table tbody {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}
.pos-cart-table tr {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) 80px 95px 90px 70px !important;
  align-items: center !important;
  width: 100% !important;
}
.cart-row td {
  padding: 12px 8px !important;
}
.cart-item-name {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}

.product-tile {
  min-height: 160px !important;
  max-height: 200px !important;
}

.pos-cart-items {
  min-height: 100px !important;
}
