/* ============================================================
   POS CRM – Global Design System
   Sleek Light Mode + Premium Modern POS Aesthetic
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-base:        #f3f6f9;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #fafbfe;
  --glass-border:   #e2e8f0;
  --glass-shadow:   0 4px 24px rgba(148, 163, 184, 0.12);

  --accent:         #4f46e5;
  --accent-light:   #6366f1;
  --accent-dark:    #3730a3;
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #0ea5e9;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --sidebar-w:  260px;
  --header-h:   64px;
  --transition: all 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { scroll-behavior: smooth; max-width: 100vw; overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

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

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99;
  display: none; opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-overlay.show { display: block; opacity: 1; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.sidebar-logo .logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-store {
  margin: 16px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.sidebar-store .store-label { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.sidebar-store .store-name  { color: var(--text-primary); font-weight: 700; margin-top: 2px; }

.sidebar-nav { padding: 8px 12px; flex: 1; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.nav-item.active {
  background: #eef2ff;
  color: var(--accent);
  font-weight: 600;
}

.nav-item .nav-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  padding-bottom: 70px;
}

/* ── Top Header ────────────────────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-wrap h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-title-wrap .breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.header-actions { display: flex; align-items: center; gap: 16px; }

.header-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.header-user-info { text-align: right; }
.header-user-info .user-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.header-user-info .user-role { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ── Page Content ──────────────────────────────────────────── */
.page-content { padding: 28px; flex: 1; min-width: 0; }

/* ══════════════════════════════════════════════════════════════
   COMPONENTS
══════════════════════════════════════════════════════════════ */

/* ── Card ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(148, 163, 184, 0.15);
  border-color: #cbd5e1;
}

.stat-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.purple { background: #eef2ff; color: #4f46e5; }
.stat-icon.green  { background: #ecfdf5; color: #10b981; }
.stat-icon.orange { background: #fffbeb; color: #f59e0b; }
.stat-icon.red    { background: #fef2f2; color: #ef4444; }
.stat-icon.blue   { background: #f0f9ff; color: #0ea5e9; }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); color:#fff; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3); }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:hover { background: #059669; transform: translateY(-1px); color:#fff; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); color:#fff; }

.btn-outline {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
}
.btn-outline:hover { background: #f8fafc; color: var(--text-primary); border-color: #94a3b8; }

.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ── Table & List View ───────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--glass-border);
  white-space: nowrap;
}

.table tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr:hover td { background: var(--bg-card-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* Mobile Card List */
.mobile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-list-item {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.flex-1 { flex: 1; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
  width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.form-control::placeholder { color: #94a3b8; }

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  padding-right: 40px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
  font-weight: 500;
}

.alert-icon { font-size: 18px; flex-shrink: 0; }

.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #e0f2fe; color: #075985; }
.badge-purple  { background: #e0e7ff; color: #3730a3; }
.badge-grey    { background: #f1f5f9; color: #475569; }

/* ── Search bar ────────────────────────────────────────────── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
}

.search-bar input {
  padding-left: 40px;
}

/* ── Autocomplete dropdown ─────────────────────────────────── */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  z-index: 500;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.autocomplete-list .ac-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
}

.autocomplete-list .ac-item:last-child { border-bottom: none; }
.autocomplete-list .ac-item:hover { background: #f8fafc; color: var(--accent); }
.autocomplete-list .ac-item .ac-sku { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── POS Sale Screen ───────────────────────────────────────── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  height: calc(100vh - var(--header-h) - 56px);
}

.pos-left { display: flex; flex-direction: column; overflow: hidden; }

.pos-cart-table { flex: 1; overflow-y: auto; }

.pos-right {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-summary {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pos-summary-row.total {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 2px solid var(--glass-border);
  padding-top: 16px;
  margin-top: 6px;
}

.pos-summary-row.due-row { color: var(--danger); }

.pos-footer { padding: 20px; border-top: 1px solid var(--glass-border); background: #f8fafc; }

/* Rate edit input in table */
.rate-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  width: 95px;
  transition: var(--transition);
  outline: none;
}
.rate-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.qty-input {
  width: 70px;
}

/* ── Ledger table colors ────────────────────────────────────── */
.ledger-debit  { color: var(--danger); font-weight: 600; }
.ledger-credit { color: var(--success); font-weight: 600; }
.ledger-balance { font-weight: 700; }

/* ── Print / Receipt ───────────────────────────────────────── */
.receipt-wrap {
  max-width: 300px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  padding: 16px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.receipt-wrap .receipt-store-name {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.receipt-wrap .receipt-divider {
  border: none;
  border-top: 1px dashed #555;
  margin: 8px 0;
}

.receipt-wrap table { width: 100%; border-collapse: collapse; }
.receipt-wrap td { padding: 2px 0; vertical-align: top; }
.receipt-wrap .text-right { text-align: right; }
.receipt-wrap .text-center { text-align: center; }
.receipt-wrap .bold { font-weight: 700; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.page-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  place-items: center;
}

.modal-overlay.open { display: grid; }

.modal-box {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 32px;
  width: 90%;
  max-width: 480px;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: var(--text-primary); }

/* ── Login / Auth Pages ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(79, 70, 229, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 20px 40px rgba(148, 163, 184, 0.1);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
  justify-content: center;
}

.auth-logo .logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: white;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.auth-logo h2 { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.auth-logo p  { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.auth-heading { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); text-align: center; letter-spacing: -0.5px;}
.auth-sub     { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; text-align: center; }

/* ── Utilities ─────────────────────────────────────────────── */
.d-flex        { display: flex; }
.flex-wrap     { flex-wrap: wrap; }
.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }
.mt-0 { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-accent  { color: var(--accent); }
.fw-700 { font-weight: 700; }
.fs-10  { font-size: 10px; }
.fs-11  { font-size: 11px; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.fs-14  { font-size: 14px; }
.fs-15  { font-size: 15px; }
.fs-16  { font-size: 16px; }
.fs-18  { font-size: 18px; }
.fs-20  { font-size: 20px; }
.fs-24  { font-size: 24px; }
.w-100  { width: 100%; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Responsive ────────────────────────────────────────────── */
/* ── Utilities ────────────────────────────────────────────────── */
.mobile-only { display: none; }
.d-none { display: none !important; }

@media (max-width: 1024px) {
  .pos-layout { grid-template-columns: 1fr; height: auto; }
}

/* ── Bottom Navigation ─────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 65px;
  background: var(--bg-surface);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  flex: 1;
  height: 100%;
  gap: 4px;
  transition: var(--transition);
}

.bottom-nav .nav-item.active {
  color: var(--accent);
}

.bottom-nav .nav-item .nav-icon {
  font-size: 20px;
}

.bottom-nav .nav-item .nav-label {
  font-size: 10px;
  font-weight: 600;
}

.bottom-nav .nav-item-fab-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
}

.bottom-nav .nav-item-fab {
  position: absolute;
  bottom: 10px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  font-size: 24px;
  transition: transform 0.2s ease;
}

.bottom-nav .nav-item-fab:active {
  transform: scale(0.95);
}

/* ── Floating Action Button (FAB) ──────────────────────────── */
.fab-bottom-right {
  position: fixed;
  bottom: 85px; /* Above bottom nav */
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  font-size: 24px;
  z-index: 100;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.fab-bottom-right:active {
  transform: scale(0.95);
}

.fab-bottom-right:hover {
  color: white;
  background: var(--accent-dark);
}

@media (max-width: 768px) {
  .mobile-only { display: block; }
  .page-title-wrap h1 { font-size: 18px; }
  .page-title-wrap .breadcrumb { display: none; }
  .header-user-info { display: none; }
  .top-header { padding: 0 16px; height: 60px; }
  
  .page-content { padding: 12px; min-width: 0; }
  
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
  .stat-card { padding: 12px; gap: 8px; min-width: 0; }
  .stat-card > div { min-width: 0; }
  .stat-icon { width: 36px; height: 36px; font-size: 16px; flex-shrink: 0; }
  .stat-value { font-size: 16px; word-break: break-word; line-height: 1.2; }
  .stat-label { font-size: 11px; line-height: 1.3; }
  
  .form-grid  { grid-template-columns: 1fr; gap: 12px; }
  
  .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  .pos-layout { display: flex; flex-direction: column; gap: 16px; height: auto; }
}

/* ── Print media ────────────────────────────────────────────── */
@media print {
  body, .app-wrapper, .main-content { background: #fff !important; }
  .sidebar, .top-header, .bottom-nav, .no-print { display: none !important; }
  .main-content { margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 !important; }
  .receipt-wrap { max-width: 100%; box-shadow: none; }
  .card { border: none; box-shadow: none; }
}

/* ── Icons ──────────────────────────────────────────────────── */
.lucide {
  width: 1.1em;
  height: 1.1em;
  vertical-align: text-bottom;
  display: inline-block;
}
.btn .lucide, .btn-icon .lucide {
  vertical-align: middle;
}
.alert-icon .lucide {
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}
