/* ============================================
   RoachStack POS — Design System
   Glassmorphism + Modern Palette
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  /* Primary - Teal / Mint (Reflecting the reference image) */
  --primary-50: #eef7f6;
  --primary-100: #d1ece8;
  --primary-200: #a3d9d1;
  --primary-300: #69bfb4;
  --primary-400: #3fa195;
  --primary-500: #1a8a7c;
  --primary-600: #136a60;
  --primary-700: #0f544c;
  --primary-800: #0d463f;
  --primary-900: #0a3832;

  /* Secondary - Soft Blue/Teal */
  --secondary-50: #f0f9f9;
  --secondary-100: #d9f0ef;
  --secondary-200: #b3dfdd;
  --secondary-300: #88c8c5;
  --secondary-400: #65b1ad;
  --secondary-500: #499995;
  --primary: var(--primary-500);
  --secondary: var(--text-muted);

  /* Accent - Sage Gold/Silver */
  --accent-gold: #9ea9a3;
  --accent-gold-light: #c2ccc7;
  --accent-gold-lighter: #e5eee9;

  /* Neutrals */
  --white: #ffffff;
  --bg-body: #f3f9f8;
  --bg-gradient-start: #d3ece9;
  --bg-gradient-mid: #e5f1ef;
  --bg-gradient-end: #f3f7f7;
  --text-primary: #1f2d2b;
  --text-secondary: #4a5c5a;
  --text-muted: #859694;
  --border-light: rgba(26, 138, 124, 0.08);
  --border-card: rgba(255, 255, 255, 0.4);

  /* Glass - Refined for Teal theme */
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-bg-hover: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.45);
  --glass-shadow: 0 8px 32px rgba(20, 100, 90, 0.08);
  --glass-blur: 20px;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 0px;
  --sidebar-bg: rgba(255, 255, 255, 0.42);

  /* Status Colors - Vibrant Emerald/Teal variants */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: var(--primary-500);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
}

img {
  max-width: 100%;
  display: block;
}

/* ── Layout: App Wrapper ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px 32px;
  transition: margin-left var(--transition-normal);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), width var(--transition-normal);
  overflow: hidden;
}

.sidebar-header {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
}

.sidebar-brand h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.sidebar-brand span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-100) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--primary-200);
  border-radius: 4px;
}

.nav-section {
  margin-bottom: 6px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 10px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.87rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(26, 138, 124, 0.06);
  color: var(--primary-600);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  color: white;
  box-shadow: 0 4px 15px rgba(199, 80, 104, 0.25);
}

.nav-item.active:hover {
  transform: none;
}

.nav-item i,
.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--danger);
  color: white;
  font-weight: 600;
}

.nav-item.active .badge {
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: rgba(26, 138, 124, 0.06);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-200), var(--secondary-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-info .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-bar-greeting {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.top-bar-greeting span {
  color: var(--primary-500);
}

.top-bar h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 138, 124, 0.1);
}

.btn-icon.has-badge {
  position: relative;
}

.btn-icon.has-badge::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid white;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--glass-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

/* ── Cards (Glass) ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  box-shadow: 0 12px 40px rgba(20, 100, 90, 0.12);
  transform: translateY(-2px);
}

.glass-card-static {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 24px;
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.stat-card.pink::before {
  background: var(--primary-500);
}

.stat-card.purple::before {
  background: var(--secondary-500);
}

.stat-card.gold::before {
  background: var(--accent-gold);
}

.stat-card.green::before {
  background: var(--success);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 100, 90, 0.12);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-icon.pink {
  background: var(--primary-50);
  color: var(--primary-500);
}

.stat-icon.purple {
  background: var(--secondary-50);
  color: var(--secondary-500);
}

.stat-icon.gold {
  background: var(--accent-gold-lighter);
  color: var(--accent-gold);
}

.stat-icon.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2px;
}

.stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-change {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 6px;
  display: inline-block;
}

.stat-change.up {
  background: var(--success-bg);
  color: var(--success);
}

.stat-change.down {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ── Content Grid ── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.content-grid.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.content-grid.full {
  grid-template-columns: 1fr;
}

.content-grid .wide {
  grid-column: span 2;
}

/* ── Tables ── */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(26, 138, 124, 0.03);
}

.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody td:first-child {
  font-weight: 500;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: white;
  box-shadow: 0 4px 15px rgba(26, 138, 124, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 138, 124, 0.25);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--primary-200);
}

.btn-outline {
  background: transparent;
  color: var(--primary-500);
  border: 1.5px solid var(--primary-200);
}

.btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
}

.btn-success {
  background: linear-gradient(135deg, #66bb6a, #43a047);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef5350, #e53935);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* ── Form Controls ── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid rgba(26, 138, 124, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(26, 138, 124, 0.08);
  background: rgba(255, 255, 255, 0.85);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.input-group {
  position: relative;
}

.input-group .form-control {
  padding-left: 42px;
}

.input-group-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.input-group-append {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236d5a6e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

.badge-teal {
  background: var(--primary-50);
  color: var(--primary-500);
}

.badge-blue {
  background: var(--secondary-50);
  color: var(--secondary-500);
}

/* ── Tabs ── */
.tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.tab-btn:hover {
  color: var(--primary-500);
}

.tab-btn.active {
  color: var(--primary-500);
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-500));
  border-radius: 2px 2px 0 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 27, 48, 0.4);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(20, 100, 90, 0.25);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
  position: relative;
}

.modal-lg {
  max-width: 850px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 1.2rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 1.3rem;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Search Bar ── */
.search-bar {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-bar input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid rgba(26, 138, 124, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  outline: none;
  transition: all var(--transition-fast);
  font-family: 'Inter', sans-serif;
}

.search-bar input:focus {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 3px rgba(26, 138, 124, 0.06);
}

.search-bar i,
.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ── POS Layout ── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - 120px);
}

.pos-products {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-content: start;
  gap: 20px;
  overflow-y: auto;
  flex: 1;
  padding: 4px;
}

.pos-product-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.pos-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(20, 100, 90, 0.15);
  border-color: var(--primary-300);
}

.pos-product-card .product-img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pos-product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.pos-product-card:hover .product-img img {
  transform: scale(1.05);
}

.pos-product-card .product-name {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.pos-product-card .product-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-500);
}

.pos-product-card .product-stock {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pos-cart {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-cart-header h3 {
  font-size: 1rem;
}

.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item-qty button {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: white;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.cart-item-qty button:hover {
  border-color: var(--primary-300);
  color: var(--primary-500);
}

.cart-item-qty span {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-600);
  min-width: 60px;
  text-align: right;
}

.cart-item-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cart-item-remove:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.pos-cart-summary {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.3);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.cart-summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-600);
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  margin-bottom: 16px;
}

/* ── Report Cards ── */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.report-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.report-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(20, 100, 90, 0.2);
}

.report-card .report-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.report-card h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.report-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Settings Sections ── */
.settings-section {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.settings-section-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.settings-section-header:hover {
  background: rgba(26, 138, 124, 0.03);
}

.settings-section-header h3 {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section-header .toggle-icon {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.settings-section-header.open .toggle-icon {
  transform: rotate(180deg);
}

.settings-section-body {
  padding: 0 20px 20px;
  display: none;
}

.settings-section-body.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Auth Pages ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
}

.auth-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(20, 100, 90, 0.15);
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-400), var(--secondary-300));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 6px 20px rgba(26, 138, 124, 0.2);
}

.auth-logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.auth-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-500);
  font-weight: 600;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
  accent-color: var(--primary-500);
  width: 16px;
  height: 16px;
}

/* ── Floating Labels ── */
.floating-group {
  position: relative;
  margin-bottom: 24px;
}

.floating-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(26, 138, 124, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  outline: none;
}

.floating-control::placeholder {
  color: transparent;
  opacity: 0;
}

.floating-label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  padding: 0 6px;
  z-index: 10;
  line-height: 1;
}

.floating-control:focus,
.floating-control:not(:placeholder-shown) {
  border-color: var(--primary-500);
  background: #ffffff;
}

.floating-control:focus+.floating-label,
.floating-control:not(:placeholder-shown)+.floating-label,
.floating-control.has-value+.floating-label {
  top: 0;
  transform: translateY(-50%) scale(0.8);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-600);
  background: #ffffff;
  /* This cuts the border */
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Auth Specific UI Fixes */
.auth-form .form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

.pagination button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--glass-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination button:hover {
  border-color: var(--primary-300);
  color: var(--primary-500);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(26, 138, 124, 0.2);
}

/* ── Alerts / Notifications ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--success-bg);
  color: #2e7d32;
  border: 1px solid rgba(102, 187, 106, 0.3);
}

.alert-warning {
  background: var(--warning-bg);
  color: #e65100;
  border: 1px solid rgba(255, 167, 38, 0.3);
}

.alert-danger {
  background: var(--danger-bg);
  color: #c62828;
  border: 1px solid rgba(239, 83, 80, 0.3);
}

.alert-info {
  background: var(--info-bg);
  color: #1565c0;
  border: 1px solid rgba(66, 165, 245, 0.3);
}

/* ── Tool Cards ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 28px;
  text-align: center;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(20, 100, 90, 0.15);
  border-color: var(--primary-300);
}

.tool-card .tool-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.tool-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* DataTables Custom Styling for System Tools */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_filter label {
  font-size: 0;
  /* Hides the "Search:" text */
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: 0 !important;
  padding: 8px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary-400);
  background: white;
  box-shadow: 0 0 0 3px rgba(26, 138, 124, 0.05);
}

/* ── Misc ── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

.text-teal {
  color: var(--primary-500);
}

.text-blue {
  color: var(--secondary-500);
}

.text-muted {
  color: var(--text-muted);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.d-flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

/* ── Animations ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-grid .wide {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .top-bar h1 {
    font-size: 1.3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pos-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .auth-card {
    padding: 28px 24px;
  }

  .modal {
    padding: 24px;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar Backdrop (mobile) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 27, 48, 0.3);
  z-index: 999;
}

.sidebar-backdrop.active {
  display: block;
}

/* ── Low Stock Alert Widget ── */
.low-stock-list {
  list-style: none;
}

.low-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.low-stock-item:last-child {
  border-bottom: none;
}

.low-stock-item .item-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.low-stock-item .item-qty {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
}

.low-stock-item .item-qty.critical {
  background: var(--danger-bg);
  color: var(--danger);
}

.low-stock-item .item-qty.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

/* ── Activity Timeline ── */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.teal {
  background: var(--primary-400);
}

.activity-dot.blue {
  background: var(--secondary-400);
}

.activity-dot.green {
  background: var(--success);
}

.activity-dot.orange {
  background: var(--warning);
}

.activity-text {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-text strong {
  color: var(--text-primary);
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Chart Placeholder ── */
.chart-placeholder {
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #e0e0e0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked+.toggle-slider {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  border-color: var(--primary-600);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ── Utilities ── */
.d-flex {
  display: flex !important;
}

.d-grid {
  display: grid !important;
}

.flex-column {
  flex-direction: column !important;
}

.align-center {
  align-items: center !important;
}

.justify-between {
  justify-content: space-between !important;
}

.justify-center {
  justify-content: center !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-1 {
  flex: 1 !important;
}

.gap-4 {
  gap: 4px !important;
}

.gap-8 {
  gap: 8px !important;
}

.gap-12 {
  gap: 12px !important;
}

.gap-16 {
  gap: 16px !important;
}

.gap-20 {
  gap: 20px !important;
}

.gap-24 {
  gap: 24px !important;
}

.gap-32 {
  gap: 32px !important;
}

.p-0 {
  padding: 0 !important;
}

.p-8 {
  padding: 8px !important;
}

.p-12 {
  padding: 12px !important;
}

.p-16 {
  padding: 16px !important;
}

.p-24 {
  padding: 24px !important;
}

.p-32 {
  padding: 32px !important;
}

.p-40 {
  padding: 40px !important;
}

.mt-auto {
  margin-top: auto !important;
}

.mt-4 {
  margin-top: 4px !important;
}

.mt-8 {
  margin-top: 8px !important;
}

.mt-12 {
  margin-top: 12px !important;
}

.mt-16 {
  margin-top: 16px !important;
}

.mt-24 {
  margin-top: 24px !important;
}

.mt-32 {
  margin-top: 32px !important;
}

.mt-48 {
  margin-top: 48px !important;
}

.mt-64 {
  margin-top: 64px !important;
}

.mt-80 {
  margin-top: 80px !important;
}

.mt-100 {
  margin-top: 100px !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-4 {
  margin-bottom: 4px !important;
}

.mb-8 {
  margin-bottom: 8px !important;
}

.mb-12 {
  margin-bottom: 12px !important;
}

.mb-16 {
  margin-bottom: 16px !important;
}

.mb-24 {
  margin-bottom: 24px !important;
}

.mb-32 {
  margin-bottom: 32px !important;
}

.mb-48 {
  margin-bottom: 48px !important;
}

.mb-64 {
  margin-bottom: 64px !important;
}

.mb-100 {
  margin-bottom: 100px !important;
}

.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.fw-400 {
  font-weight: 400 !important;
}

.fw-500 {
  font-weight: 500 !important;
}

.fw-600 {
  font-weight: 600 !important;
}

.fw-700 {
  font-weight: 700 !important;
}