:root {
  --sidebar-width: 250px;
  --brand: #2f6fed;
  --brand-dark: #1d4ed8;
  --bg: #f4f6fb;
  --sidebar-bg: #131b2e;
  --sidebar-fg: #c7d0e0;
  --sidebar-fg-active: #ffffff;
  --card-border: #e5e9f2;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
}

/* ---------- Auth pages ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #131b2e 0%, #2f6fed 100%);
  padding: 16px;
}

.auth-card {
  background: #fff;
  border-radius: 14px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-card .subtitle {
  color: #6b7280;
  margin-bottom: 24px;
  font-size: .9rem;
}

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

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  transition: transform .2s ease;
  z-index: 1030;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-nav { padding: 10px 10px 30px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-fg);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: .88rem;
  margin-bottom: 2px;
}

.sidebar-nav a i { width: 18px; text-align: center; opacity: .85; }

.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }

.sidebar-nav a.active {
  background: var(--brand);
  color: #fff;
}

.nav-section {
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .06em;
  color: #6b7ba1;
  margin: 16px 12px 6px;
  font-weight: 700;
}

.nav-section i { width: 14px; text-align: center; margin-right: 2px; }

.sidebar-nav a.back-link {
  color: #9fb0d6;
  font-size: .82rem;
  margin-top: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  padding-bottom: 12px;
}
.sidebar-nav a.back-link:hover { color: #fff; }

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-title {
  font-weight: 700;
  font-size: 1.1rem;
  flex: 1;
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #374151;
  padding: 6px 10px;
  border-radius: 8px;
}

.btn-icon:hover { background: #f1f3f9; }

.content { padding: 22px; }

/* ---------- Cards / widgets ---------- */
.card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.stat-card {
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

.stat-card .value { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat-card .label { color: #6b7280; font-size: .82rem; }

.bg-brand { background: var(--brand); }
.bg-green { background: #16a34a; }
.bg-orange { background: #ea580c; }
.bg-purple { background: #7c3aed; }
.bg-red { background: #dc2626; }

.table thead th {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.table td { vertical-align: middle; }

.page-actions { display: flex; gap: 8px; align-items: center; }

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

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

.badge-status { text-transform: capitalize; }

.empty-state {
  text-align: center;
  color: #9aa3b5;
  padding: 32px 12px !important;
  font-size: .86rem;
}
.empty-state i {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #c3cae0;
}
.empty-state i.text-success { color: #16a34a; }

/* ---------- Module launcher cards (main dashboard) ---------- */
.module-card {
  --module-color: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: #fff;
  text-decoration: none;
  color: #1f2937;
  height: 100%;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--module-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.module-card:hover {
  color: #1f2937;
  border-color: color-mix(in srgb, var(--module-color) 45%, var(--card-border));
  box-shadow: 0 10px 22px -6px color-mix(in srgb, var(--module-color) 35%, transparent);
  transform: translateY(-3px);
}
.module-card:hover::before { transform: scaleX(1); }
.module-card-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--module-color) 12%, white);
  color: var(--module-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: background .15s ease, color .15s ease;
}
.module-card:hover .module-card-icon {
  background: var(--module-color);
  color: #fff;
}
.module-card-label { font-weight: 600; font-size: .92rem; text-align: center; }

/* ---------- Activity feed (User page) ---------- */
.activity-feed li {
  position: relative;
  padding: 0 0 14px 18px;
  border-left: 2px solid var(--card-border);
  font-size: .86rem;
}
.activity-feed li:last-child { border-left-color: transparent; padding-bottom: 0; }
.activity-feed li::before {
  content: '';
  position: absolute;
  left: -5px; top: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- POS ---------- */
.pos-card {
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow .15s, transform .1s;
}
.pos-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.pos-card:active { transform: scale(.98); }
.pos-card-img {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f5;
  color: #adb5bd;
  font-size: 2rem;
  overflow: hidden;
}
.pos-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-cart-thumb {
  width: 40px; height: 40px;
  min-width: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f3f5;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pos-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pos-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pos-keypad .pos-key, .pos-keypad .pos-key-back {
  font-size: 1.1rem;
  padding: 10px 0;
}
.pos-cat-btn.active { color: #fff; }
#posWrapper:fullscreen {
  background: var(--bg);
  padding: 16px;
  overflow-y: auto;
}

/* Sidebar toggle button: works at any screen width. Desktop starts open
   (toggling collapses it); narrow screens start collapsed (toggling
   reveals it) — same class, opposite default per breakpoint below. */
body.sidebar-toggled .sidebar { transform: translateX(-100%); }
body.sidebar-toggled .app-main { margin-left: 0; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .app-main { margin-left: 0; }
  body.sidebar-toggled .sidebar { transform: translateX(0); }
  body.sidebar-toggled .app-main { margin-left: 0; }
}

/* ---------- Printing any in-app page ---------- */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff !important; }
}

/* ---------- Finance module (10X YOU design) ---------- */
.fin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fin-title { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 2rem; color: #0f1b3d; margin: 0 0 4px; }
.fin-subtitle { color: #5b6478; margin: 0; }
.fin-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fin-head-actions .btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fin-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--card-border); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: .86rem; color: #374151; white-space: nowrap; }
.fin-kpi { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; height: 100%; }
.fin-kpi-red { background: #fff5f5; border-color: #fde2e2; }
.fin-kpi-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.tone-blue { background: #e8efff; color: #2563eb; }
.tone-red { background: #fde8e8; color: #e11d48; }
.tone-green { background: #e3f7ea; color: #16a34a; }
.tone-purple { background: #efe9fe; color: #7c3aed; }
.tone-orange { background: #fff1de; color: #ea580c; }
.tone-teal { background: #dff6f4; color: #0d9488; }
.tone-slate { background: #eef1f6; color: #475569; }
.fin-kpi-label { color: #5b6478; font-size: .86rem; }
.fin-kpi-value { font-size: 1.55rem; font-weight: 700; color: #0f1b3d; line-height: 1.25; margin: 2px 0 6px; }
.fin-kpi-trend { font-size: .82rem; color: #6b7280; }
.fin-kpi-trend .text-success, .fin-kpi-trend .text-danger { font-weight: 600; margin-right: 4px; }
.fin-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 20px; }
.row > [class*="col"] > .fin-card { height: 100%; }
.fin-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.fin-card-title { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.15rem; color: #0f1b3d; margin: 0; }
.fin-card-sub { color: #6b7280; font-size: .85rem; margin: 2px 0 0; }
.fin-link { color: var(--brand); font-size: .86rem; text-decoration: underline; white-space: nowrap; }
.fin-chart-wrap { position: relative; width: 100%; }
.fin-legend { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.fin-legend li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.fin-legend .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.fin-legend .pct { margin-left: auto; font-weight: 600; }
.fin-table { margin: 0; font-size: .88rem; }
.fin-table thead th { background: #f6f8fc; border-bottom: none; font-weight: 600; color: #5b6478; padding: 10px 12px; }
.fin-table td { padding: 10px 12px; border-color: #eef1f6; }
.fin-table a { text-decoration: none; }
.fin-pill { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.fin-pill-success { background: #e3f7ea; color: #15803d; }
.fin-pill-danger { background: #fde8e8; color: #dc2626; }
.fin-pill-warning { background: #fff4d6; color: #b45309; }
.fin-pill-info { background: #e6f0ff; color: #2563eb; }
.fin-pill-primary { background: #e8efff; color: #1d4ed8; }
.fin-pill-secondary { background: #eef1f6; color: #475569; }
.fin-pill-purple { background: #efe9fe; color: #6d28d9; }
.fin-tabs { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; border-bottom: 1px solid var(--card-border); flex-wrap: wrap; }
.fin-tabs a { display: block; padding: 10px 14px; color: #374151; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .92rem; }
.fin-tabs a:hover { color: var(--brand); }
.fin-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; background: #f3f7ff; border-radius: 6px 6px 0 0; }
.fin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fin-search { position: relative; min-width: 260px; }
.fin-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6b7280; }
.fin-search input { padding-left: 36px; }
.fin-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.fin-pager .page-link { border-radius: 8px !important; margin: 0 3px; min-width: 34px; text-align: center; }
.fin-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fin-tiles.cols-2 { grid-template-columns: repeat(2, 1fr); }
.fin-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 8px; border: 1px solid var(--card-border); border-radius: 12px; background: #fff; text-decoration: none; color: #1f2937; font-size: .86rem; text-align: center; transition: box-shadow .15s, transform .1s; }
.fin-tile:hover { box-shadow: 0 6px 16px rgba(37,99,235,.12); color: #1f2937; transform: translateY(-1px); }
.fin-tile .fin-kpi-icon { width: 42px; height: 42px; font-size: 1.1rem; }
.fin-tool { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--card-border); border-radius: 12px; text-decoration: none; color: #1f2937; height: 100%; }
.fin-tool:hover { box-shadow: 0 6px 16px rgba(37,99,235,.12); color: #1f2937; }
.fin-tool strong { display: block; font-size: .92rem; }
.fin-tool small { color: #6b7280; }
.fin-tool .fin-kpi-icon { width: 44px; height: 44px; font-size: 1.1rem; }
.fin-callout { display: flex; gap: 12px; align-items: center; background: #eef4ff; border: 1px solid #dbe6ff; border-radius: 12px; padding: 14px 16px; text-decoration: none; color: #1f2937; }
.fin-callout small { color: #5b6478; }
.fin-section-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 22px; height: 100%; }
.fin-section-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 700; color: #0f1b3d; margin: 0 0 2px; }
.fin-section-card .fin-card-sub { margin-bottom: 16px; }
.fin-form-footer { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.fin-switch-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.fin-switch-row .form-check-label { min-width: 130px; font-weight: 500; }
.fin-tree-toggle { background: none; border: none; padding: 0 4px; color: #475569; width: 20px; }
.fin-tree-name { display: inline-flex; align-items: center; gap: 8px; }
.fin-tree-name .fa-folder { color: #f5b82e; }
.fin-tree-name .fa-file-lines { color: #64748b; }
.fin-date-badge { width: 50px; text-align: center; border-radius: 8px; background: #f3f5fa; padding: 4px 0; line-height: 1.1; flex-shrink: 0; }
.fin-date-badge strong { display: block; font-size: 1.1rem; }
.fin-date-badge.urgent { background: #fde8e8; color: #dc2626; }
.fin-config-card { display: flex; gap: 16px; align-items: center; padding: 20px; background: #fff; border: 1px solid var(--card-border); border-radius: 14px; text-decoration: none; color: #1f2937; height: 100%; }
.fin-config-card:hover { box-shadow: 0 6px 16px rgba(37,99,235,.12); color: #1f2937; }
.fin-config-card strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.fin-config-card small { color: #5b6478; }
.fin-config-card .chev { margin-left: auto; color: var(--brand); }
.fin-kv .k { color: #6b7280; font-size: .84rem; }
.fin-kv .v { font-weight: 500; margin-top: 2px; }
@media (max-width: 767px) {
  .fin-tiles { grid-template-columns: repeat(2, 1fr); }
  .fin-head-actions { align-items: flex-start; }
  .fin-title { font-size: 1.6rem; }
}

/* ---------- Main dashboard (dashboard.php) ---------- */
.topbar-search { position: relative; flex: 1; max-width: 640px; }
.topbar-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #6b7280; }
.topbar-search input { width: 100%; border: 1px solid var(--card-border); border-radius: 10px; padding: 9px 90px 9px 40px; font-size: .9rem; background: #fff; outline: none; }
.topbar-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.topbar-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; font-size: .72rem; padding: 2px 6px; border-radius: 6px; }
.topbar-search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--card-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,27,61,.12); max-height: 420px; overflow-y: auto; z-index: 1050; padding: 6px 0; }
.topbar-search-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; font-weight: 700; padding: 8px 14px 4px; }
.topbar-search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; color: #1f2937; text-decoration: none; font-size: .88rem; }
.topbar-search-results a small { color: #6b7280; white-space: nowrap; }
.topbar-search-results a:hover, .topbar-search-results a.active { background: #f3f7ff; }
.topbar-search-results a.topbar-search-more { border-top: 1px solid var(--card-border); margin-top: 4px; color: var(--brand); font-weight: 600; justify-content: center; }
.topbar-search-empty { padding: 10px 14px; color: #6b7280; font-size: .88rem; }
.topbar-spacer { flex: 1; }
.topbar-bell { position: relative; font-size: 1.2rem; }
.topbar-bell-dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; border: 2px solid #fff; }
.topbar-notifications { width: 300px; padding: 0; overflow: hidden; }
.topbar-store { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--card-border); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: .88rem; color: #1f2937; white-space: nowrap; }
.topbar-store:hover { background: #f8fafc; }
.topbar-profile { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; padding: 4px 6px; border-radius: 10px; color: #1f2937; text-align: left; }
.topbar-profile:hover { background: #f1f3f9; }
.topbar-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-profile-text { display: flex; flex-direction: column; line-height: 1.15; }
.topbar-profile-text strong { font-size: .9rem; }
.topbar-profile-text small { color: #6b7280; font-size: .76rem; }

.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-title { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 2rem; color: #0f1b3d; margin: 0 0 4px; }
.dash-sub { color: #5b6478; margin: 0; }
.dash-head-right { text-align: right; }
.dash-date { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.1rem; color: #0f1b3d; }
.dash-quote { color: #5b6478; font-size: .88rem; margin-top: 4px; }

.dash-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dash-kpi { display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--card-border); text-decoration: none; color: #1f2937; transition: box-shadow .15s, transform .1s; min-width: 0; }
.dash-kpi:hover { color: #1f2937; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,27,61,.08); }
.dash-kpi-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; background: #fff; }
.dash-kpi-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-kpi-label { font-size: .8rem; color: #374151; }
.dash-kpi-label small { color: #6b7280; }
.dash-kpi-value { font-size: 1.15rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-kpi-foot { font-size: .74rem; margin-top: 4px; }
.dash-kpi-blue { background: #f1f5ff; border-color: #dfe7fb; } .dash-kpi-blue .dash-kpi-icon { color: #2563eb; background: #e0e9ff; }
.dash-kpi-green { background: #f2fbf5; border-color: #dcf1e3; } .dash-kpi-green .dash-kpi-icon { color: #16a34a; background: #dcf5e4; }
.dash-kpi-orange { background: #fff8f0; border-color: #fbe8d2; } .dash-kpi-orange .dash-kpi-icon { color: #ea580c; background: #ffedd8; }
.dash-kpi-purple { background: #f7f4ff; border-color: #e9e2fc; } .dash-kpi-purple .dash-kpi-icon { color: #7c3aed; background: #ece5ff; }
.dash-kpi-teal { background: #effafb; border-color: #d7f0f2; } .dash-kpi-teal .dash-kpi-icon { color: #0891b2; background: #d8f3f6; }
.dash-kpi-red { background: #fff4f5; border-color: #fbdfe2; } .dash-kpi-red .dash-kpi-icon { color: #e11d48; background: #ffe1e5; }
.dash-up { color: #16a34a; font-weight: 600; }
.dash-down { color: #dc2626; font-weight: 600; }
.dash-link { color: var(--brand); font-weight: 600; font-size: .86rem; text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-kpi-foot.dash-link { font-size: .8rem; }

.dash-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; padding: 20px; height: 100%; }
.dash-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-card-head h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 700; color: #0f1b3d; margin: 0; }
.dash-card-sub { color: #6b7280; font-size: .86rem; margin: 2px 0 0; }
.dash-select { width: auto; min-width: 130px; border-radius: 8px; }
.dash-chart-summary { color: #374151; font-size: .84rem; margin-bottom: 6px; }
.dash-chart-wrap { position: relative; height: 240px; }

.dash-donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dash-donut-chart { position: relative; width: 190px; height: 190px; flex-shrink: 0; margin: 0 auto; }
.dash-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dash-donut-center strong { font-size: 1.35rem; }
.dash-donut-center small { color: #6b7280; font-size: .78rem; }
.dash-legend { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 180px; }
.dash-legend a { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: #1f2937; text-decoration: none; font-size: .9rem; border-radius: 6px; }
.dash-legend a:hover { background: #f5f7fb; }
.dash-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dash-legend-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-legend-pct { color: #374151; font-weight: 500; }

.dash-table thead th { background: #f7f8fb; }
.dash-table td { font-size: .86rem; }
.dash-table th, .dash-table td { padding-left: 6px; padding-right: 6px; }
.dash-table td a { color: inherit; text-decoration: none; }
.dash-row-link { cursor: pointer; }
.dash-row-link:hover td { background: #f8faff; }
.dash-product { display: inline-flex; align-items: center; gap: 10px; }
.dash-thumb { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--card-border); background: #f8fafc; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #94a3b8; flex-shrink: 0; }
.dash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.dash-pill-green { background: #dcfce7; color: #15803d; }
.dash-pill-blue { background: #dbeafe; color: #1d4ed8; }
.dash-pill-purple { background: #ede9fe; color: #6d28d9; }
.dash-pill-gray { background: #eef1f6; color: #475569; }
.dash-pill-red { background: #fee2e2; color: #dc2626; }

.dash-banner { position: relative; overflow: hidden; height: 100%; min-height: 140px; border-radius: 14px; padding: 26px 28px; background: linear-gradient(110deg, #e9f1ea 0%, #dfeadf 55%, #cfdfcf 100%); border: 1px solid #d7e4d7; }
.dash-banner-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: #4b5b4d; font-weight: 600; }
.dash-banner-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 700; color: #0f1b3d; margin: 6px 0; position: relative; z-index: 1; }
.dash-banner-text { color: #374151; position: relative; z-index: 1; }
.dash-banner-leaf { position: absolute; right: 30px; top: 50%; transform: translateY(-50%) rotate(-25deg); font-size: 6.5rem; color: rgba(22,101,52,.22); }
.dash-banner-leaf2 { position: absolute; right: 150px; bottom: -8px; font-size: 3.5rem; color: rgba(22,101,52,.14); }
.dash-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px 6px; border: 1px solid var(--card-border); border-radius: 12px; text-decoration: none; color: #1f2937; font-size: .84rem; font-weight: 500; text-align: center; transition: box-shadow .15s, transform .1s; }
.dash-action i { font-size: 1.4rem; }
.dash-action:hover { color: #1f2937; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,99,235,.12); }
.dash-text-purple { color: #7c3aed; }

@media (max-width: 1399px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .dash-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .topbar-search kbd, .topbar-profile-text { display: none; }
  .topbar-search input { padding-right: 12px; }
}
@media (max-width: 767px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-head-right { text-align: left; }
  .dash-title { font-size: 1.6rem; }
  .topbar { flex-wrap: wrap; }
  .topbar-search { order: 10; flex-basis: 100%; max-width: none; }
  .topbar-spacer { display: none; }
  .topbar-store span { display: none; }
  .dash-banner-leaf2 { display: none; }
}

/* ---------- Inventory module ---------- */
.dash-pill-orange { background: #ffedd5; color: #c2410c; }
.inv-wh { display: block; padding: 10px 8px; margin: 0 -8px; border-radius: 10px; color: #1f2937; text-decoration: none; }
.inv-wh + .inv-wh { border-top: 1px solid var(--card-border); border-radius: 0; }
.inv-wh:hover { background: #f8faff; color: #1f2937; }
.inv-bar { height: 6px; background: #eef1f6; border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }
.inv-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 4px; }
.inv-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 575px) { .inv-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inv-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--card-border); background: #fff; color: #374151; font-size: .86rem; font-weight: 500; text-decoration: none; }
.inv-tab:hover { color: #1f2937; background: #f8faff; }
.inv-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.inv-tab-count { background: #eef1f6; color: #475569; border-radius: 999px; padding: 0 8px; font-size: .74rem; font-weight: 600; line-height: 1.6; }
.inv-tab.active .inv-tab-count { background: rgba(255,255,255,.22); color: #fff; }
.inv-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.inv-toolbar .form-select { width: auto; min-width: 150px; }
.inv-search { position: relative; flex: 1; min-width: 220px; }
.inv-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.inv-search input { padding-left: 36px; }
.inv-table td { padding-top: 10px; padding-bottom: 10px; }
.inv-thumb { width: 42px; height: 42px; }
.inv-icon-btn { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--card-border); background: #fff; color: #475569; }
.inv-icon-btn:hover { background: #f3f7ff; color: var(--brand); }
.inv-bar-green span { background: #22c55e; }
.inv-bar-orange span { background: #f59e0b; }
.inv-bar-red span { background: #ef4444; }
.inv-stock-green { color: #15803d; }
.inv-stock-orange { color: #c2410c; }
.inv-stock-red { color: #dc2626; }
.inv-crumbs { font-size: .82rem; color: #6b7280; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inv-crumbs a { color: #6b7280; text-decoration: none; }
.inv-crumbs a:hover { color: var(--brand); }
.inv-crumbs i { font-size: .6rem; }
.inv-doc-head .dash-title .dash-pill { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .78rem; vertical-align: middle; }
.inv-doc { border-radius: 14px; }
.inv-doc-tabs { border-bottom: 1px solid var(--card-border); }
@media (max-width: 767px) { .inv-doc-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; } }
.inv-doc-tabs .nav-link { white-space: nowrap; border: none; border-bottom: 2px solid transparent; color: #4b5563; font-weight: 500; padding: 10px 12px; margin-bottom: -1px; font-size: .94rem; }
.inv-doc-tabs .nav-link i { color: #9ca3af; margin-right: 4px; font-size: .85rem; }
.inv-doc-tabs .nav-link:hover { color: var(--brand); border-bottom-color: #c7d7fb; }
.inv-doc-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.inv-doc-tabs .nav-link.active i { color: var(--brand); }
.inv-doc .card { border-radius: 12px; }
.inv-doc .card h6 { font-weight: 600; color: #0f1b3d; }
.inv-save-bar { position: sticky; bottom: 0; z-index: 5; background: rgba(255,255,255,.96); backdrop-filter: blur(4px); border-top: 1px solid var(--card-border); margin: 16px -24px -24px; padding: 12px 24px; border-radius: 0 0 14px 14px; justify-content: flex-end; }
.inv-view .card { border-radius: 14px; }
.inv-view .card h6 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.05rem; color: #0f1b3d; }
.inv-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767px) { .inv-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inv-hero-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background: #f5f7fb; border: 1px solid var(--card-border); display: flex; align-items: center; justify-content: center; color: #94a3b8; overflow: hidden; }
.inv-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.inv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.inv-facts div { background: #f7f8fb; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.inv-facts span { font-size: .74rem; color: #6b7280; }
.inv-facts strong { font-size: .95rem; }
.inv-wh-row + .inv-wh-row { margin-top: 10px; }
.inv-trend { position: relative; height: 220px; }
.dash-title .dash-pill { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .78rem; vertical-align: middle; }
.inv-table td:first-child { min-width: 220px; }
.inv-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef4ff; color: #1d4ed8; border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 500; text-decoration: none; }
.inv-chip:hover { background: #dbe7ff; color: #1d4ed8; }
.inv-avatar { width: 34px; height: 34px; border-radius: 10px; background: #eef4ff; color: var(--brand); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.inv-icon-danger:hover { color: #dc2626; background: #fef2f2; }
.inv-facts.mt-0 { margin-top: 0; }
.inv-doc h6 { font-weight: 600; color: #0f1b3d; }
.dash-legend-static { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: .9rem; }
.inv-abc { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--card-border); border-radius: 12px; color: #1f2937; text-decoration: none; height: 100%; transition: box-shadow .15s; }
.inv-abc .dash-pill { align-self: flex-start; }
.inv-abc:hover { color: #1f2937; box-shadow: 0 6px 16px rgba(37,99,235,.10); }
.inv-abc.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
@media print { .dash-kpi, .dash-card { break-inside: avoid; } .inv-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- POS module (10X YOU POS, separate screens) ---------- */
.pos-top-select { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; padding: 6px 8px; border-radius: 8px; font-size: .88rem; color: #1f2937; white-space: nowrap; }
.pos-top-select:hover { background: #f1f3f9; }
.pos-online { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .88rem; color: #16a34a; padding: 0 10px; border-right: 1px solid var(--card-border); margin-right: 4px; white-space: nowrap; }
.pos-online .dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.pos-online.offline { color: #dc2626; }
.pos-online.offline .dot { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
@media (max-width: 767px) { .pos-online .txt { display: none; } .topbar-title { flex: 0 0 auto; } }

.pos-title { font-weight: 700; font-size: 1.35rem; color: #0f1b3d; margin: 0; }
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pos-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; }
.pos-card-body { padding: 18px 20px; }
.pos-card-title { font-weight: 700; font-size: 1rem; color: #0f1b3d; margin: 0; }

.pos-sale { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.pos-sale.with-filters { grid-template-columns: 240px minmax(0, 1fr) 380px; }
@media (max-width: 1399px) { .pos-sale.with-filters { grid-template-columns: 220px minmax(0, 1fr) 340px; } }
@media (max-width: 1199px) { .pos-sale, .pos-sale.with-filters { grid-template-columns: minmax(0, 1fr); } }
.pos-cart { position: sticky; top: 84px; }
@media (max-width: 1199px) { .pos-cart { position: static; } }

.pos-searchbar { display: flex; gap: 0; background: #fff; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.pos-searchbar .pos-search-in { position: relative; flex: 1; }
.pos-searchbar .pos-search-in > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #6b7280; }
.pos-searchbar input { border: none; width: 100%; padding: 13px 14px 13px 44px; font-size: .95rem; outline: none; background: transparent; }
.pos-scan-btn { border: none; border-left: 1px solid var(--card-border); background: #f3f7ff; color: var(--brand); width: 58px; font-size: 1.3rem; }
.pos-scan-btn:hover { background: #e6efff; }
.pos-filter-btn { border: none; border-left: 1px solid var(--card-border); background: #fff; color: #374151; padding: 0 16px; font-size: .9rem; white-space: nowrap; }
.pos-filter-btn.active, .pos-filter-btn:hover { color: var(--brand); background: #f3f7ff; }
.pos-filter-btn .badge { font-size: .7rem; }

.pos-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pos-chip { border: 1px solid transparent; background: #f3f5fa; color: #374151; border-radius: 10px; padding: 8px 16px; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.pos-chip:hover { background: #e9eef8; }
.pos-chip.active { background: #eaf1ff; border-color: #93b4f5; color: #0f1b3d; font-weight: 600; }

.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
.pos-prod { background: #fff; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .15s, transform .1s; }
.pos-prod:hover { box-shadow: 0 8px 20px rgba(15,27,61,.09); transform: translateY(-1px); }
.pos-prod.out { opacity: .55; cursor: not-allowed; }
.pos-prod-img { height: 130px; background: #f7f8fb; display: flex; align-items: center; justify-content: center; color: #b6c0d1; font-size: 2.2rem; overflow: hidden; }
.pos-prod-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pos-prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.pos-prod-name { font-weight: 600; font-size: .92rem; color: #111827; line-height: 1.3; min-height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pos-prod-stock { font-size: .74rem; color: #6b7280; margin-top: 2px; }
.pos-prod-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.pos-prod-price { font-weight: 600; font-size: .95rem; color: #111827; }
.pos-add { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 5px 14px; font-size: .85rem; font-weight: 600; }
.pos-add:hover { background: var(--brand-dark); }
.pos-hide-images .pos-prod-img { display: none; }
.pos-empty { text-align: center; color: #6b7280; padding: 40px 10px; }
.pos-empty i { font-size: 2rem; color: #c3cad8; display: block; margin-bottom: 8px; }

.pos-filters { padding: 16px; }
.pos-filters h6 { font-weight: 700; font-size: .9rem; color: #0f1b3d; margin: 16px 0 8px; }
.pos-filters .form-check { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding-left: 0; }
.pos-filters .form-check-input { margin: 0; float: none; }
.pos-filters .form-check-label { flex: 1; font-size: .9rem; color: #374151; }
.pos-filters .cnt { font-size: .78rem; color: #6b7280; background: #f3f5fa; border-radius: 6px; padding: 0 7px; }
.pos-filter-list { max-height: 220px; overflow-y: auto; }
.pos-range { position: relative; height: 28px; }
.pos-range input[type=range] { position: absolute; left: 0; right: 0; top: 6px; width: 100%; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; }
.pos-range input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand); cursor: pointer; }
.pos-range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; cursor: pointer; }
.pos-range-track { position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px; background: #dbe5fb; }
.pos-range-fill { position: absolute; top: 13px; height: 4px; border-radius: 4px; background: var(--brand); }

.pos-cart-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--card-border); }
.pos-cart-head h2 { font-size: 1.2rem; font-weight: 700; margin: 0; color: #0f1b3d; }
.pos-link-danger { color: #dc2626; background: none; border: none; font-weight: 600; font-size: .9rem; padding: 0; }
.pos-link { color: var(--brand); background: none; border: none; font-weight: 600; font-size: .86rem; padding: 0; text-decoration: none; }
.pos-cart-body { padding: 14px 20px; }
.pos-lines { max-height: 38vh; overflow-y: auto; margin: 8px -6px 0; padding: 0 6px; }
.pos-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f2f7; }
.pos-line-thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; background: #f7f8fb; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #b6c0d1; }
.pos-line-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pos-line-info { flex: 1; min-width: 0; cursor: pointer; }
.pos-line-name { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-line-price { color: #6b7280; font-size: .84rem; }
.pos-line-meta { font-size: .74rem; color: #16a34a; }
.pos-qty { display: inline-flex; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.pos-qty button { border: none; background: #fff; width: 30px; height: 32px; color: var(--brand); font-size: 1rem; }
.pos-qty button:hover { background: #f3f7ff; }
.pos-qty input { width: 38px; border: none; border-left: 1px solid var(--card-border); border-right: 1px solid var(--card-border); text-align: center; font-weight: 600; font-size: .9rem; outline: none; -moz-appearance: textfield; }
.pos-qty input::-webkit-outer-spin-button, .pos-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pos-qty.lg button { width: 44px; height: 42px; font-size: 1.15rem; }
.pos-qty.lg input { width: 64px; }
.pos-trash { border: none; background: none; color: #ef4444; padding: 4px 6px; font-size: 1rem; }
.pos-totals { border-top: 1px solid var(--card-border); margin-top: 6px; padding-top: 12px; }
.pos-totals .row-t { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: .92rem; color: #374151; }
.pos-totals .row-t strong { color: #111827; }
.pos-totals .grand { font-size: 1.3rem; font-weight: 700; color: #0f1b3d; border-top: 1px solid var(--card-border); margin-top: 6px; padding-top: 10px; }
.pos-disc-in { display: flex; align-items: center; gap: 10px; }
.pos-disc-in .input-group { width: 130px; }
.pos-btn-soft { background: #f3f7ff; border: 1px solid #dbe6ff; color: var(--brand); font-weight: 600; border-radius: 10px; padding: 10px; }
.pos-btn-soft:hover { background: #e6efff; color: var(--brand-dark); }
.pos-btn-soft-danger { background: #fff5f5; border: 1px solid #fde2e2; color: #dc2626; font-weight: 600; border-radius: 10px; padding: 10px; }
.pos-btn-soft-danger:hover { background: #fee2e2; color: #b91c1c; }
.pos-pay-btn { width: 100%; background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 14px; font-size: 1.1rem; font-weight: 700; margin-top: 12px; }
.pos-pay-btn:hover { background: var(--brand-dark); }
.pos-pay-btn:disabled { background: #9db8f3; }
.pos-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: .9rem; }
.pos-banner.warn { background: #fff8eb; border: 1px solid #fde7bd; color: #92400e; }
.pos-banner.info { background: #eef4ff; border: 1px solid #dbe6ff; color: #1e3a8a; }
.pos-banner.ok { background: #effaf2; border: 1px solid #cdeed7; color: #166534; }

.pos-modal .modal-content { border-radius: 16px; border: none; }
.pos-modal .modal-header { border-bottom: 1px solid var(--card-border); padding: 18px 24px; }
.pos-modal .modal-title { font-weight: 700; }
.pos-modal .modal-body { padding: 20px 24px; }
.pos-modal .modal-footer { border-top: none; padding: 0 24px 22px; }
.pos-modal .form-label { color: #374151; font-size: .88rem; margin-bottom: 4px; }
.pos-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pos-seg button { border: 1px solid transparent; background: #f3f5fa; color: #4b5563; border-radius: 10px; padding: 10px; font-weight: 600; }
.pos-seg button.active { background: #eaf1ff; border-color: #93b4f5; color: var(--brand); }
.pos-modal .btn-lg-pos { min-width: 150px; padding: 10px 18px; border-radius: 10px; font-weight: 600; }

.pos-checkout { display: grid; grid-template-columns: 1fr 1.1fr 1.35fr; gap: 18px; align-items: start; }
@media (max-width: 1199px) { .pos-checkout { grid-template-columns: 1fr 1fr; } .pos-checkout > :last-child { grid-column: 1 / -1; } }
@media (max-width: 767px) { .pos-checkout { grid-template-columns: 1fr; } }
.pos-panel-head { padding: 14px 18px; border-bottom: 1px solid var(--card-border); font-weight: 700; color: #0f1b3d; font-size: .95rem; }
.pos-kv { display: flex; justify-content: space-between; padding: 11px 18px; border-bottom: 1px solid #f0f2f7; font-size: .92rem; color: #4b5563; }
.pos-kv strong { color: #111827; }
.pos-kv.grand { background: #f7f8fb; font-size: 1.25rem; font-weight: 700; color: #0f1b3d; border-bottom: none; padding: 16px 18px; }
.pos-kv.grand strong { color: #0f1b3d; }
.pos-methods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 575px) { .pos-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pos-method { border: 1px solid var(--card-border); background: #fff; border-radius: 12px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .82rem; color: #4b5563; }
.pos-method i { font-size: 1.3rem; color: #64748b; }
.pos-method.m-upi i { color: #16a34a; } .pos-method.m-wallet i { color: #ea580c; }
.pos-method:hover { background: #f8faff; }
.pos-method.active { border: 2px solid var(--brand); background: #f3f7ff; color: var(--brand); font-weight: 600; }
.pos-method.active i { color: var(--brand); }
.pos-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pos-quick button { border: 1px solid #c9d8f7; background: #fff; color: var(--brand); border-radius: 8px; padding: 8px 0; font-weight: 600; font-size: .9rem; }
.pos-quick button:hover { background: #f3f7ff; }
.pos-split-row { display: grid; grid-template-columns: 120px 1fr 1fr 32px; gap: 8px; margin-bottom: 8px; }
.pos-customer-chip { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #f0f2f7; }
.pos-customer-chip .av { width: 38px; height: 38px; border-radius: 10px; background: #eef4ff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }

.pos-success { max-width: 760px; margin: 10px auto; text-align: center; padding: 40px 24px; }
.pos-success-icon { width: 96px; height: 96px; border-radius: 50%; background: #16a34a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 2.8rem; box-shadow: 0 10px 24px rgba(22,163,74,.3); }
.pos-success h1 { font-weight: 800; font-size: 2rem; margin: 20px 0 8px; color: #0f1b3d; }
.pos-success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; margin: 26px auto 0; }
.pos-success-actions .pos-btn-soft { padding: 14px; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }

.pos-table { margin: 0; font-size: .92rem; }
.pos-table thead th { background: #f7f8fb; color: #5b6b8c; text-transform: uppercase; font-size: .76rem; letter-spacing: .03em; font-weight: 600; padding: 12px 14px; border-bottom: none; white-space: nowrap; }
.pos-table thead th a { color: inherit; text-decoration: none; }
.pos-table td { padding: 13px 14px; border-color: #eef1f6; vertical-align: middle; }
.pos-table a.no { color: #2554c7; font-weight: 500; text-decoration: none; }
.pos-table a.no:hover { text-decoration: underline; }
.pos-pill { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pos-pill.green { background: #dcfce7; color: #15803d; } .pos-pill.red { background: #fee2e2; color: #dc2626; }
.pos-pill.orange { background: #ffedd5; color: #c2410c; } .pos-pill.gray { background: #eef1f6; color: #475569; }
.pos-pill.blue { background: #dbeafe; color: #1d4ed8; } .pos-pill.purple { background: #ede9fe; color: #6d28d9; }
.pos-act { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dbe6ff; background: #f5f8ff; color: var(--brand); border-radius: 8px; padding: 6px 16px; font-weight: 600; font-size: .88rem; text-decoration: none; }
.pos-act:hover { background: #e6efff; color: var(--brand-dark); }
.pos-dots { border: none; background: #f7f8fb; border-radius: 8px; width: 38px; height: 32px; color: var(--brand); }
.pos-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-tab { padding: 8px 16px; border-radius: 10px; border: 1px solid transparent; color: #374151; text-decoration: none; font-weight: 500; font-size: .92rem; background: #f7f8fb; }
.pos-tab:hover { color: #111827; background: #eef2f9; }
.pos-tab.active { background: #eaf1ff; border-color: #93b4f5; color: #0f1b3d; font-weight: 600; }
.pos-tab .n { font-size: .74rem; color: #6b7280; margin-left: 4px; }
.pos-daterange { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--card-border); border-radius: 10px; padding: 4px 10px; background: #fff; }
.pos-daterange i { color: var(--brand); }
.pos-daterange input { border: none; outline: none; font-size: .88rem; width: 132px; background: transparent; }
.pos-export { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--card-border); background: #fff; color: var(--brand); border-radius: 10px; padding: 8px 16px; font-weight: 600; text-decoration: none; font-size: .9rem; }
.pos-export:hover { background: #f3f7ff; }

.pos-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 991px) { .pos-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pos-kpi { border: 1px solid var(--card-border); border-radius: 12px; padding: 14px 18px; background: #fbfcfe; }
.pos-kpi:first-child { background: #f3f7ff; border-color: #dfe7fb; }
.pos-kpi .l { color: #5b6478; font-size: .86rem; }
.pos-kpi .v { font-size: 1.45rem; font-weight: 700; color: #0f1b3d; margin: 4px 0 2px; }
.pos-kpi .d { font-size: .82rem; font-weight: 600; }
.pos-chart { position: relative; height: 280px; }

.pos-shift-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 991px) { .pos-shift-grid { grid-template-columns: 1fr; } }
.pos-seg-tabs { display: inline-flex; gap: 0; margin-bottom: -1px; }
.pos-seg-tabs a { padding: 10px 26px; border: 1px solid var(--card-border); background: #f7f8fb; color: #374151; text-decoration: none; font-weight: 600; font-size: .92rem; }
.pos-seg-tabs a:first-child { border-radius: 10px 0 0 0; }
.pos-seg-tabs a:last-child { border-radius: 0 10px 0 0; border-left: none; }
.pos-seg-tabs a.active { background: #fff; color: #0f1b3d; border-color: #93b4f5; border-bottom-color: #fff; }
.pos-facts .f { display: grid; grid-template-columns: 200px 1fr; padding: 9px 0; font-size: .94rem; }
.pos-facts .f span { color: #5b6478; }
.pos-facts .f strong { color: #111827; font-weight: 600; }

.pos-settings-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 0; }
.pos-settings-grid > div + div { border-left: 1px solid var(--card-border); }
@media (max-width: 991px) { .pos-settings-grid { grid-template-columns: 1fr; } .pos-settings-grid > div + div { border-left: none; border-top: 1px solid var(--card-border); } }
.pos-toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.pos-toggle label { color: #374151; font-size: .94rem; }
.pos-toggle .form-switch .form-check-input { width: 2.8em; height: 1.45em; cursor: pointer; }
.pos-section-title { font-weight: 700; color: #1d3a8a; font-size: 1.2rem; margin: 0 0 16px; }

.pos-receipt-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .app-main { margin-left: 0 !important; } }
a.pos-btn-soft { text-decoration: none; }
@media (max-width: 575px) {
  .pos-online .txt { display: none; }
  .pos-top-select { padding-left: 6px; padding-right: 6px; }
  .topbar:has(#posOnline) { flex-wrap: nowrap; gap: 6px; padding: 10px 12px; }
  .topbar:has(#posOnline) .topbar-user { margin-left: auto; }
  .pos-online { padding: 0 6px; }
}
