/* ==========================================================================
   KAMBO SOFT ERP — Kambo CRM Design System
   Colors: Rich Navy (#0F172A) & Amber Gold (#F59E0B)
   Font: Plus Jakarta Sans & Material Symbols Rounded
   ========================================================================== */

:root {
  --primary: #0F172A;
  --primary-2: #1E293B;
  --primary-3: #334155;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-soft: #FEF3C7;
  --secondary: #4F46E5;
  --secondary-soft: #EEF2FF;
  --success: #10B981;
  --success-soft: #ECFDF5;
  --info: #3B82F6;
  --info-soft: #EFF6FF;
  --danger: #EF4444;
  --danger-soft: #FEF2F2;
  --warning-soft: #FFFBEB;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --text: #0F172A;
  --text-2: #64748B;
  --muted: #94A3B8;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, .08);
  --sidebar: 264px;
}

/* Hide all native scrollbars across entire app for clean app-like UI */
* {
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; color: var(--text); }

/* Material Symbols Icon Font */
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; font-size: 20px;
  line-height: 1; display: inline-block; vertical-align: middle;
  font-feature-settings: 'liga'; white-space: nowrap; overflow: hidden;
  width: 1em; letter-spacing: normal; text-transform: none;
  direction: ltr; -webkit-font-smoothing: antialiased; user-select: none;
}

/* ==========================================================================
   LAYOUT & SIDEBAR
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar); background: var(--primary); color: #CBD5E1;
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column;
  z-index: 40; transition: transform .2s ease;
}

.brand {
  display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand-logo {
  width: 42px; height: 42px; border-radius: 10px; display: block; flex: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.brand-name { color: #fff; font-weight: 900; letter-spacing: 2px; font-size: 17px; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .4px; }

.store-badge-card {
  margin: 12px 14px 4px; padding: 10px 14px; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
}
.store-badge-card .ms { color: var(--accent); font-size: 22px; }
.store-badge-card .store-title { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.2; }
.store-badge-card .store-sub { font-size: 11px; color: #94A3B8; }

.nav { padding: 8px 12px 20px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: #64748B; padding: 16px 12px 6px; font-weight: 700;
}
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 12px; color: #CBD5E1; font-weight: 600; margin-bottom: 2px;
  transition: background .15s, color .15s, box-shadow .15s; cursor: pointer;
}
.nav a:hover { background: var(--primary-2); color: #fff; }
.nav a.active {
  background: var(--accent); color: var(--primary);
  box-shadow: 0 6px 16px rgba(245,158,11,.25); font-weight: 700;
}
.nav a .ms { font-size: 20px; }
.nav .count {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px;
}
.nav a.active .count { background: var(--primary); }

.sidebar-foot {
  padding: 14px 18px; border-top: 1px solid var(--primary-2);
  display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.15);
}
.sidebar-foot .who { flex: 1; min-width: 0; }
.sidebar-foot .who b {
  color: #fff; display: block; font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar-foot .who span { font-size: 11px; color: var(--muted); }

/* User avatar */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
  color: #fff; display: grid; place-items: center; font-weight: 800;
  flex: none; font-size: 14px;
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; border-radius: 16px; }
.avatar.driver { background: var(--accent); color: var(--primary); }
.avatar.seller { background: var(--secondary); color: #fff; }
.avatar.admin { background: var(--danger); color: #fff; }

.icon-btn {
  background: transparent; border: 0; color: inherit; cursor: pointer;
  padding: 8px; border-radius: 10px; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--primary-2); color: #fff; }

/* ==========================================================================
   MAIN CONTENT & TOPBAR
   ========================================================================== */
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 14px 28px;
}
.topbar h1 { font-size: 20px; font-weight: 800; }
.topbar .crumb { font-size: 12px; color: var(--text-2); }
.topbar .spacer { flex: 1; }

.search { position: relative; width: min(340px, 35vw); }
.search input {
  width: 100%; padding: 9px 14px 9px 38px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); font: inherit;
  font-size: 13px; outline: none; transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(15,23,42,.05); }
.search .ms { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }

.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1560px; width: 100%; }

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 15px; font-weight: 800; }
.card-head .sub { font-size: 12px; color: var(--text-2); font-weight: 500; }
.section { margin-top: 24px; }

/* KPI Cards */
.kpi {
  padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  position: relative; overflow: hidden; border-radius: var(--radius);
}
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-icon .ms { font-size: 20px; }
.kpi > div:last-child { min-width: 0; flex: 1; overflow: hidden; }
.kpi-label { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot { font-size: 11.5px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot b { color: var(--success); }

.kpi.dark { background: var(--primary); border-color: var(--primary); color: #fff; }
.kpi.dark .kpi-label, .kpi.dark .kpi-foot { color: #94A3B8; }
.kpi.dark .kpi-foot b { color: var(--accent); }

.tone-amber { background: var(--accent-soft); color: var(--accent-dark); }
.tone-green { background: var(--success-soft); color: var(--success); }
.tone-blue { background: var(--info-soft); color: var(--info); }
.tone-indigo { background: var(--secondary-soft); color: var(--secondary); }
.tone-red { background: var(--danger-soft); color: var(--danger); }
.tone-slate { background: #F1F5F9; color: var(--primary-3); }

/* Low Stock Clean List (replaces crammed table) */
.low-stock-list { display: flex; flex-direction: column; }
.low-stock-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 18px; border-bottom: 1px solid #F1F5F9;
  transition: background .15s;
}
.low-stock-item:hover { background: #FAFBFD; }
.low-stock-item:last-child { border-bottom: none; }
.low-stock-info { min-width: 0; flex: 1; }
.low-stock-name { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.low-stock-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.low-stock-action { display: flex; align-items: center; gap: 8px; flex: none; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrap { overflow-x: auto; width: 100%; }
table.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-2); font-weight: 700;
  padding: 12px 16px; background: #F8FAFC; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; font-size: 13.5px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.table a.link { font-weight: 700; color: var(--primary); }
.table a.link:hover { color: var(--accent-dark); text-decoration: underline; }

.cell-user { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.cell-user small { display: block; color: var(--text-2); font-size: 12px; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 800; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace; font-size: 12px; }

/* ==========================================================================
   BADGES & CHIPS
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: #047857; }
.badge-warning { background: var(--warning-soft); color: #B45309; }
.badge-info { background: var(--info-soft); color: #1D4ED8; }
.badge-indigo { background: var(--secondary-soft); color: var(--secondary); }
.badge-danger { background: var(--danger-soft); color: #B91C1C; }
.badge-muted { background: #F1F5F9; color: var(--text-2); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot.off { background: var(--border-dark); }

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 16px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: transform .05s, background .15s, box-shadow .15s, border-color .15s;
  background: var(--primary); color: #fff;
}
.btn:hover { background: var(--primary-2); }
.btn:active { transform: translateY(1px); }
.btn .ms { font-size: 18px; }

.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--border-dark); }
.btn-outline-accent {
  background: #fff;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
  font-weight: 700;
  transition: all .15s ease;
}
.btn-outline-accent:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #F1F5F9; color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn-sm .ms { font-size: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.input, select.input, textarea.input {
  width: 100%; padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; font: inherit;
  font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,23,42,.06);
}
textarea.input { resize: vertical; min-height: 80px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field .help { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 4px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs.tabs-scroll {
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px;
  scrollbar-width: none !important; -ms-overflow-style: none !important; -webkit-overflow-scrolling: touch;
}
.tabs.tabs-scroll::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.tab {
  padding: 7px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); font-weight: 700; font-size: 13px;
  color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; cursor: pointer;
  white-space: nowrap; flex: none;
}
.tab:hover { border-color: var(--border-dark); color: var(--text); }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab .n { font-size: 11px; background: #F1F5F9; color: var(--text-2); border-radius: 999px; padding: 0 7px; }
.tab.active .n { background: var(--accent); color: var(--primary); }

/* ==========================================================================
   POS (KASSA) SYSTEM STYLES
   ========================================================================== */
.pos-layout {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr);
  gap: 20px; align-items: start;
}
.pos-catalog { display: flex; flex-direction: column; gap: 14px; }
.pos-filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pos-products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px;
}
.pos-product-card {
  background: var(--surface);
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 126px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  user-select: none;
}
.pos-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.12);
}
.pos-product-card:active {
  transform: scale(0.98);
  border-color: var(--accent-dark);
}
.pos-product-name {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.35;
  color: #0F172A;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.pos-product-sku { font-size: 11px; color: var(--muted); }
.pos-product-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #F1F5F9;
}
.pos-product-price-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.pos-product-price {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
}
.pos-product-words {
  font-size: 10.5px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  max-width: 130px;
}
.pos-product-stock-pill {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pos-product-stock-pill.out {
  background: #FEE2E2;
  color: #DC2626;
}

.pos-cart-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 80px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.pos-cart-items {
  max-height: 200px; min-height: 100px; overflow-y: auto;
  border-bottom: 1px solid var(--border); padding: 0 16px;
}
.pos-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}
.pos-item:last-child { border-bottom: 0; }
.pos-item-info { flex: 1; min-width: 0; }
.pos-item-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-unit-price { font-size: 11px; color: var(--text-2); }
.pos-qty-ctrl { display: flex; align-items: center; gap: 4px; }
.pos-qty-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: #F8FAFC; display: grid; place-items: center; cursor: pointer; font-weight: 700;
}
.pos-qty-btn:hover { background: var(--border); }
.pos-qty-input {
  width: 44px; text-align: center; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 2px; font-weight: 700; font-size: 13px;
}
.pos-item-total { width: 75px; text-align: right; font-weight: 800; font-size: 13px; }
.pos-item-del { color: var(--muted); cursor: pointer; padding: 4px; border: 0; background: transparent; }
.pos-item-del:hover { color: var(--danger); }

.pos-summary { padding: 16px; display: grid; gap: 8px; }
.pos-summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.pos-summary-row.total { font-size: 20px; font-weight: 900; color: var(--text); padding-top: 6px; border-top: 1px solid var(--border); }

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(4px); z-index: 2000; display: grid; place-items: center;
  padding: 16px; overflow-y: auto; animation: fadeIn .15s ease;
}
.modal-card {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2); overflow: hidden; animation: slideUp .2s ease;
}
.modal-card.lg { max-width: 860px; }
.modal-card.sm { max-width: 440px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; font-weight: 800; }
.modal-body { padding: 20px; max-height: calc(85vh - 120px); overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  background: #F8FAFC; border-top: 1px solid var(--border);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto; padding: 12px 18px; border-radius: 12px; font-weight: 700;
  font-size: 13.5px; box-shadow: 0 10px 30px rgba(15,23,42,.15);
  display: flex; align-items: center; gap: 10px; animation: slideIn .2s ease;
  min-width: 260px; max-width: 400px; color: #fff;
}
.toast-success { background: #047857; }
.toast-error { background: #B91C1C; }
.toast-info { background: #1E293B; }
@keyframes slideIn { from { transform: translateX(50px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   LOGIN PAGE (Matches Kambo CRM Login Layout)
   ========================================================================== */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.login-hero {
  background: var(--primary); color: #fff; padding: 48px; display: flex;
  flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-hero::after {
  content: ''; position: absolute; width: 540px; height: 540px; border-radius: 50%;
  right: -180px; bottom: -200px;
  background: radial-gradient(circle, rgba(245,158,11,.35), transparent 65%);
}
.login-hero h2 { font-size: 34px; font-weight: 800; line-height: 1.25; max-width: 460px; color: #fff; }
.login-hero p { color: #94A3B8; max-width: 420px; font-size: 14px; }
.login-feats { display: grid; gap: 14px; position: relative; z-index: 1; }
.login-feats div { display: flex; gap: 12px; align-items: center; color: #CBD5E1; font-weight: 600; font-size: 13.5px; }
.login-feats .ms { color: var(--accent); font-size: 22px; }

.login-form-wrap { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-card { width: 100%; max-width: 400px; }
.login-card h1 { font-size: 26px; font-weight: 800; color: var(--primary); }

.role-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.role-chip {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #F8FAFC; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text-2);
}
.role-chip:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

/* ==========================================================================
   ALERTS, EMPTY & UTILITY
   ========================================================================== */
.alerts { display: grid; gap: 8px; margin-bottom: 16px; }
.alert { padding: 12px 16px; border-radius: 12px; font-weight: 600; display: flex; gap: 10px; align-items: center; border: 1px solid; }
.alert-success { background: var(--success-soft); color: #065F46; border-color: #A7F3D0; }
.alert-error { background: var(--danger-soft); color: #991B1B; border-color: #FECACA; }
.alert-info, .alert-warning { background: var(--warning-soft); color: #92400E; border-color: #FDE68A; }

.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .ms { font-size: 48px; color: var(--border-dark); display: block; margin: 0 auto 12px; }
.empty h4 { font-size: 16px; color: var(--text); font-weight: 700; margin-bottom: 4px; }
.empty p { font-size: 13px; max-width: 360px; margin: 0 auto; }

.loading-box { text-align: center; padding: 40px; color: var(--text-2); font-weight: 600; }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
/* ==========================================================================
   PWA & MOBILE COMPONENTS (Base styles)
   ========================================================================== */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-close-sidebar-btn {
  display: none;
  background: transparent;
  border: none;
  color: #94A3B8;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-right: 12px;
  cursor: pointer;
  place-items: center;
}
.mobile-close-sidebar-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-backdrop {
  display: none;
}
.mobile-bottom-nav {
  display: none;
}
.mobile-cart-bar {
  display: none;
}
.pwa-install-card {
  margin: 10px 14px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pwa-install-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Mobile-first PWA)
   ========================================================================== */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart-panel { position: static; }
}

@media (max-width: 900px) {
  /* Layout & Navigation */
  .layout {
    min-height: 100vh;
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
    width: 290px;
    max-width: 85vw;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.4);
    transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-close-sidebar-btn {
    display: grid;
  }
  .main {
    margin-left: 0;
    width: 100%;
    min-width: 0;
  }

  /* Topbar */
  .topbar {
    padding: 10px 14px;
    min-height: 54px;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }
  .menu-btn {
    display: grid;
    color: var(--text);
    width: 36px;
    height: 36px;
  }
  .topbar-title-wrap {
    min-width: 0;
    flex: 1 1 auto;
  }
  .topbar-title-wrap .crumb {
    display: none;
  }
  #topbar-title {
    font-size: 17px;
    line-height: 1.2;
    margin: 0;
  }
  .search {
    display: none;
  }
  .topbar .btn-row {
    gap: 6px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .topbar .btn-row .btn {
    padding: 6px 10px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  /* Content area */
  .content {
    padding: 12px 12px calc(80px + env(safe-area-inset-bottom, 0px));
  }

  /* Grids */
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    z-index: 990;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
  }
  .mobile-nav-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748B;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, transform .1s ease;
  }
  .mobile-nav-item:active {
    transform: scale(0.92);
  }
  .mobile-nav-item .ms {
    font-size: 22px;
    transition: transform .15s ease;
  }
  .mobile-nav-item .mn-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1px;
  }
  .mobile-nav-item.active {
    color: var(--accent-dark);
  }
  .mobile-nav-item.active .ms {
    color: var(--accent);
    transform: scale(1.1);
  }

  /* POS (Kassa) on Mobile */
  .pos-layout {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .pos-catalog {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .tabs.tabs-scroll {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
  }
  .pos-products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 90px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .pos-product-card {
    min-height: 95px !important;
    padding: 10px 10px !important;
    border-radius: 12px !important;
  }
  .pos-product-name {
    font-size: 12px !important;
    line-height: 1.25 !important;
    min-height: 28px !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 4px !important;
  }
  .pos-product-meta {
    margin-top: 4px !important;
    padding-top: 4px !important;
    gap: 4px !important;
  }
  .pos-product-price {
    font-size: 13.5px !important;
    font-weight: 800 !important;
  }
  .pos-product-stock-badge {
    font-size: 10px !important;
    padding: 2px 5px !important;
  }
  .pos-product-price-words {
    font-size: 9.5px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* Mobile Floating Cart Bar */
  .mobile-cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #fff;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 950;
    animation: slideUpCart .25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUpCart {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .mcb-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
  }
  .mcb-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .mcb-icon-box .ms { font-size: 20px; }
  .mcb-count {
    font-size: 11px;
    color: #94A3B8;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mcb-total {
    font-size: 14.5px;
    font-weight: 900;
    color: #FBBF24;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mcb-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 15px;
    font-size: 13.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: transform .1s ease;
    flex-shrink: 0;
  }
  .mcb-btn:active {
    transform: scale(0.95);
  }
  .mcb-btn .ms { font-size: 16px; }

  /* Bottom-Sheet Modals on Mobile */
  .modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, .65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 2500 !important;
    padding: 0 !important;
    align-items: flex-end !important;
    display: flex !important;
  }
  body.modal-open .mobile-bottom-nav,
  body.modal-open .mobile-cart-bar {
    display: none !important;
  }
  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25) !important;
    animation: slideUpBottom .25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  @keyframes slideUpBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  @keyframes scannerLaser {
    0% { top: 15%; opacity: 0.7; }
    50% { top: 85%; opacity: 1; }
    100% { top: 15%; opacity: 0.7; }
  }
  .modal-head {
    padding: 14px 18px !important;
  }
  .modal-head h3 {
    font-size: 16px !important;
  }
  .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 14px 16px !important;
  }
  .modal-foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    background: #F8FAFC !important;
  }
  .modal-foot .btn {
    padding: 12px 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  /* Dashboard KPIs Compact Grid */
  .card.kpi {
    padding: 10px 10px !important;
    border-radius: 12px !important;
    gap: 8px !important;
    min-width: 0 !important;
  }
  .kpi-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .kpi-icon .ms {
    font-size: 16px !important;
  }
  .kpi-label {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
  }
  .kpi-value {
    font-size: 13.5px !important;
    margin-top: 2px !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.2 !important;
  }
  .kpi-foot {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ==========================================================================
   MONEY WORDS & FINANCIAL TYPOGRAPHY
   ========================================================================== */
.money-words {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 3px;
  letter-spacing: .1px;
}
.money-words.small { font-size: 10px; }
.money-words.strong { color: var(--text); font-weight: 700; }
.money-words-live {
  font-size: 11.5px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 5px;
  font-weight: 700;
  display: inline-block;
}

/* ==========================================================================
   THERMAL RECEIPT (58mm / 80mm) STYLES
   ========================================================================== */
.thermal-receipt {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  background: #fff;
  border: 1px dashed var(--border-dark);
  padding: 16px;
  font-family: 'Courier New', Courier, monospace, system-ui;
  font-size: 12px;
  line-height: 1.35;
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.thermal-header { text-align: center; margin-bottom: 12px; border-bottom: 1px dashed #94a3b8; padding-bottom: 10px; }
.thermal-title { font-size: 15px; font-weight: 900; letter-spacing: 1px; }
.thermal-meta { font-size: 11px; color: #475569; margin-top: 4px; }
.thermal-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 11.5px; }
.thermal-table th { text-align: left; border-bottom: 1px solid #000; padding: 4px 0; font-size: 11px; }
.thermal-table td { padding: 4px 0; vertical-align: top; }
.thermal-totals { border-top: 1px dashed #000; padding-top: 8px; margin-top: 6px; font-size: 12px; }
.thermal-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.thermal-row.total-bold { font-size: 14px; font-weight: 900; border-top: 1px solid #000; padding-top: 4px; }
.thermal-words { font-size: 11px; font-style: italic; color: #334155; margin: 4px 0 10px; line-height: 1.25; }
.thermal-footer { text-align: center; margin-top: 14px; border-top: 1px dashed #94a3b8; padding-top: 10px; font-size: 11px; color: #64748b; }

@media print {
  body * { visibility: hidden; }
  #thermal-print-area, #thermal-print-area * { visibility: visible; }
  #thermal-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 78mm;
    margin: 0;
    padding: 2mm;
    border: none !important;
    box-shadow: none !important;
    font-size: 11px !important;
  }
}

/* --------------------------------------------------------------------------
   DASHBOARD & KPI EXTENSIONS
-------------------------------------------------------------------------- */
.g-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .g-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .g-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* --------------------------------------------------------------------------
   CHECKOUT WIZARD MODAL STYLES
-------------------------------------------------------------------------- */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: #F8FAFC;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  opacity: 0.55;
  transition: all 0.2s ease;
}
.stepper-step.active {
  color: var(--accent-dark);
  font-weight: 800;
  opacity: 1;
}
.stepper-step.completed {
  color: #059669;
  font-weight: 700;
  opacity: 1;
}
.stepper-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}
.stepper-step.active .stepper-num {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}
.stepper-step.completed .stepper-num {
  background: #10B981;
  color: #fff;
}
.stepper-divider {
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin: 0 10px;
}
.stepper-divider.active {
  background: var(--accent);
}

.choice-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 600px) {
  .choice-cards-grid { grid-template-columns: 1fr; }
}

.choice-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  user-select: none;
}
.choice-card:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}
.choice-card.selected {
  border-color: var(--accent);
  background: #FFFBEB;
  box-shadow: 0 0 0 1px var(--accent);
}
.choice-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  color: var(--text-2);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.choice-card-icon .ms { font-size: 22px; }
.choice-card.selected .choice-card-icon {
  background: var(--accent);
  color: #fff;
}
.choice-card-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}
.choice-card-sub {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.35;
}
.choice-card.selected .choice-card-title {
  color: #92400E;
}



/* ==========================================================================
   WIZARD MODAL & SEARCHABLE SELECTORS (Kambo Soft POS)
   ========================================================================== */
.modal-card.wizard {
  max-width: 820px !important;
  width: 95% !important;
  border-radius: 18px !important;
}
.modal-card.wizard .modal-body {
  padding: 20px 24px !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}
.modal-card.wizard .modal-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.cust-badge-card {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.search-select-wrap {
  position: relative !important;
  width: 100% !important;
}
.search-select-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000 !important;
  scrollbar-width: none;
}
.driver-picker-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.15s ease;
}
.driver-picker-row:hover {
  background: #FFFBEB;
}
.driver-picker-row:last-child {
  border-bottom: 0;
}
.driver-badge-card {
  border: 1.5px solid #BAE6FD;
  background: #F0F9FF;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pos-touch-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.pos-touch-choice:hover {
  border-color: var(--accent);
  background: #FFFDF7;
}
.pos-touch-choice.selected {
  border-color: var(--accent);
  background: #FFFBEB;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.pos-touch-choice .radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pos-touch-choice.selected .radio-dot {
  border-color: var(--accent);
}
.pos-touch-choice.selected .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.pos-chip-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pos-chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.pos-chip-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.search-select-results::-webkit-scrollbar { display: none; }
.search-select-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}
.search-select-row:hover {
  background: #F8FAFC;
}
.search-select-row:last-child {
  border-bottom: 0;
}

/* Reports Page Enhancements */
.report-period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 20px;
}
.report-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pnl-strip {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.pnl-step {
  display: flex;
  flex-direction: column;
}
.pnl-step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}
.pnl-step-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.pnl-step-val.green { color: #059669; }
.pnl-step-val.red { color: #DC2626; }
.pnl-step-val.blue { color: #2563EB; }
.pnl-op {
  font-size: 18px;
  font-weight: 800;
  color: #94A3B8;
}

.kpi-profit-highlight {
  border: 1.5px solid #10B981 !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

.report-debtor-row {
  transition: background .15s ease;
}
.report-debtor-row:hover {
  background: #F8FAFC !important;
}

/* Network status pill & offline indicators */
.net-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.net-status-pill.online {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.net-status-pill.offline {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  animation: pulseOffline 2s infinite ease-in-out;
}
.net-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.net-status-pill.online .net-dot {
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.net-status-pill.offline .net-dot {
  background: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
@keyframes pulseOffline {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.offline-watermark {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px dashed #F59E0B;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Price Tag (Cennik) & Barcode Label Styles */
.cennik-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px;
}
.cennik-card {
  width: 240px;
  border: 1.5px solid #1E293B;
  border-radius: 8px;
  padding: 8px 10px;
  background: #FFF;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  page-break-inside: avoid;
}
.cennik-store {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748B;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 3px;
  margin-bottom: 4px;
}
.cennik-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  color: #0F172A;
  margin-bottom: 6px;
  min-height: 32px;
}
.cennik-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: #F8FAFC;
  padding: 4px 6px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.cennik-price {
  font-size: 18px;
  font-weight: 900;
  color: #0F172A;
}
.cennik-unit {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
}
.cennik-barcode-wrap {
  text-align: center;
  margin-top: 2px;
}
.cennik-barcode-svg {
  width: 100%;
  height: 38px;
  display: block;
}
.cennik-barcode-num {
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #334155;
  margin-top: 2px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #cennik-print-area, #cennik-print-area * {
    visibility: visible;
  }
  #cennik-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .cennik-card {
    border: 1px solid #000;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

