/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ======================== CSS DESIGN SYSTEM ======================== */
:root {
  /* Primary Brand */
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-subtle: rgba(59, 130, 246, 0.08);

  /* Accent (revenue/money only) */
  --accent: #f59e0b;
  --accent-light: #fbbf24;

  /* Semantic */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f97316;
  --warning-bg: rgba(249, 115, 22, 0.1);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);

  /* Backgrounds â€” Zinc neutrals (no blue tint) */
  --bg-main: #09090b;
  --bg-surface: #0f0f12;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --bg-elevated: #27272a;
  --bg-input: #0c0c0f;

  /* Borders */
  --border: #27272a;
  --border-light: #1c1c1f;
  --border-focus: #3f3f46;

  /* Text â€” 4-level hierarchy */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --text-inverse: #09090b;

  /* Gradients (used sparingly) */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-success: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  --gradient-surface: linear-gradient(135deg, #18181b 0%, #0f0f12 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);

  /* Shadows â€” Multi-layer neutral (no colored glow) */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.4);
  --shadow-glow: none;
  --shadow-glow-accent: none;

  /* Focus ring */
  --ring-focus: 0 0 0 2px var(--bg-main), 0 0 0 4px var(--primary);

  /* Sizing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Corporate Godown Specifics */
  --godown-primary: #0ea5e9;
  --godown-bg: #070708;
  --godown-card-border: rgba(255,255,255,0.08);
  --godown-accent: #f59e0b;
}

/* ======================== LIGHT MODE THEME ======================== */
body.light-mode {
  /* Backgrounds */
  --bg-main: #f4f4f5;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;

  /* Borders */
  --border: #e4e4e7;
  --border-light: #f4f4f5;
  --border-focus: #d4d4d8;

  /* Text */
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-inverse: #ffffff;

  /* Shadows - a bit more structured for light mode depth */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

  /* Gradients adjustments */
  --gradient-surface: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  --gradient-glass: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.03) 100%);

  /* Specifics */
  --godown-bg: #f8fafc;
  --godown-card-border: rgba(0,0,0,0.08);
  
  /* Reverse badge styling */
  --success-bg: rgba(34, 197, 94, 0.15);
  --warning-bg: rgba(249, 115, 22, 0.15);
  --error-bg: rgba(239, 68, 68, 0.15);
}

/* ======================== RESET & BASE ======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv01', 'cv02', 'cv03';
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

/* Type scale */
.text-display    { font-size: 2rem;    font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.text-heading    { font-size: 1.5rem;  font-weight: 700; letter-spacing: -0.02em;  line-height: 1.2; }
.text-title      { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.text-body       { font-size: 0.875rem; font-weight: 400; line-height: 1.6; }
.text-caption    { font-size: 0.75rem;  font-weight: 500; letter-spacing: 0.025em; text-transform: uppercase; }
.text-mono       { font-family: 'Courier New', monospace; font-size: 0.8125rem; }

/* Tabular figures for currency and numbers */
.tabular-nums, .stat-value, .table td:last-child, .pos-cart-item-price, .pos-cart-item-name {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum', "tnum";
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ======================== APP SHELL ======================== */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ======================== SIDEBAR ======================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-slow);
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.sidebar-title {
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.02) 100%);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 50%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 1px 0 8px rgba(59, 130, 246, 0.6);
}

.nav-icon { font-size: 1.2rem; flex-shrink: 0; width: 24px; text-align: center; }

.nav-section-label {
  padding: 16px 14px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

.sync-dot.offline { background: var(--error); animation: none; }
.sync-dot.syncing { background: var(--accent); animation: pulse-dot 0.8s infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ======================== MAIN CONTENT ======================== */
.main-content {
  flex: 1 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.page-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ======================== CARDS ======================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-sm);
}

.card-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ======================== STAT CARDS ======================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(41,121,255,0.15); color: var(--primary); }
.stat-icon.amber { background: rgba(255,171,0,0.15); color: var(--accent); }
.stat-icon.green { background: rgba(0,200,83,0.15); color: var(--success); }
.stat-icon.red { background: rgba(213,0,0,0.15); color: var(--error); }

.stat-info { flex: 1 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-change { font-size: 0.75rem; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--error); }

/* ======================== BUTTONS ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-accent {
  background: var(--accent);
  color: var(--text-inverse);
}
.btn-accent:hover { background: #d97706; }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #16a34a; }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ======================== INPUTS ======================== */
.input-group { margin-bottom: 16px; }
.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(41,121,255,0.15);
}

.input::placeholder { color: var(--text-muted); }

.search-box {
  position: relative;
}

.search-box .input { padding-left: 40px; }

.search-box::before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
}

/* ======================== SELECT ======================== */
.select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41,121,255,0.15); }
.select option { background: var(--bg-surface); color: var(--text-primary); }

/* ======================== TABLES ======================== */
.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.table tr:hover td { background: var(--bg-card); color: var(--text-primary); }
.table tr:last-child td { border-bottom: none; }

/* ======================== BADGES ======================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-info { background: rgba(41,121,255,0.12); color: var(--primary); }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ======================== POS LAYOUT ======================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  height: 100%;
  overflow: hidden;
}

.pos-products {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pos-cart {
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pos-cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pos-cart-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.pos-cart-items {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px;
}

.pos-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.pos-cart-item:hover { border-color: var(--border); }

.pos-cart-item-info { flex: 1 1; }
.pos-cart-item-name { font-weight: 600; font-size: 0.88rem; }
.pos-cart-item-price { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }

.pos-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.qty-btn:hover { border-color: var(--primary); background: var(--primary); color: white; }

.qty-value {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.pos-cart-item-total {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
  min-width: 70px;
  text-align: right;
}

.pos-cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px;
  transition: color var(--transition-fast);
}

.pos-cart-item-remove:hover { color: var(--error); }

.pos-cart-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}

.pos-totals { margin-bottom: 16px; }

.pos-total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pos-total-row.grand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.pos-crate-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,171,0,0.08);
  border: 1px solid rgba(255,171,0,0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--accent);
}

.pos-checkout-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.product-card:active { transform: translateY(0); }

.product-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-glass);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-light);
  letter-spacing: 1px;
}

.product-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-card-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

.product-card-stock {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ======================== MODAL ======================== */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title { font-size: 1.15rem; font-weight: 700; }

.modal-close,
.modal-close-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-close:hover,
.modal-close-btn:hover {
  color: var(--error);
  border-color: var(--error);
  background: var(--error-bg);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ======================== EMPTY STATE ======================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-text { font-size: 0.88rem; max-width: 300px; }

/* ======================== ANIMATIONS & MICRO-INTERACTIONS ======================== */
.animate-in {
  animation: pageFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton Loading State */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 1em; margin-bottom: 8px; width: 100%; }
.skeleton-title { height: 1.5em; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 44px; height: 44px; border-radius: 50%; }

@keyframes skeletonShimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

/* Smooth Accordion / Table Expand */
.expandable-row-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
}
.expandable-row-content.expanded {
  grid-template-rows: 1fr;
}
.expandable-row-content > div {
  overflow: hidden;
}

/* ======================== LOADING ======================== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--text-muted);
}

/* ======================== TOASTS ======================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

.toast-success { background: #0d3320; border: 1px solid rgba(0,200,83,0.3); color: var(--success); }
.toast-error { background: #330d0d; border: 1px solid rgba(213,0,0,0.3); color: var(--error); }
.toast-info { background: #0d1a33; border: 1px solid rgba(41,121,255,0.3); color: var(--primary); }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.5;
  animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ======================== RESPONSIVE & TOUCH ======================== */
@media (max-width: 1200px) {
  .pos-layout { grid-template-columns: 1fr 340px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 1024px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar-title, .nav-label { display: none; }
  .nav-section-label { display: none; }
  .nav-item { padding: 16px; justify-content: center; }
  .nav-item.active { border-left-width: 3px; }
  .sidebar-footer .sync-indicator span:last-child { display: none; }
  .page-header { padding: 0 16px; }
  .page-body { padding: 16px; }
}

@media (max-width: 768px) {
  .mobile-header { display: flex !important; }
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    z-index: 1000;
    width: var(--sidebar-width);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-title, .nav-label, .nav-section-label { display: block; }
  .nav-item { justify-content: flex-start; padding: 12px 14px; }
  
  .pos-layout { display: flex; flex-direction: column; }
  
  /* POS Cart as Bottom Sheet */
  .pos-cart { 
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    z-index: 500;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
    border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .pos-cart.sheet-open { transform: translateY(0); }
  
  /* Touch target expansion mapping to Apple HIG standard */
  .btn, .input, .select, .qty-btn { min-height: 44px; }
  .qty-btn { min-width: 44px; }
  .product-card { padding: 16px; min-height: 120px; }
  .mobile-cart-fab { display: flex !important; }
  
  /* Horizontal scroll for un-responsive tables */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ======================== RECEIPT PRINT ======================== */
/* ======================== UNIFIED PRINT SYSTEM ======================== */
@media print {
  /* 1. Global Reset for Print */
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* 2. General visibility rules */
  .no-print, .btn-primary, .btn-outline, .btn-ghost, .sidebar-nav, .mobile-cart-fab, .modal-close-btn, .top-nav {
    display: none !important;
  }

  /* 3. Handling Modals (Receipts) */
  body:not(.printing-report) .app-shell > *:not(.modal-overlay) {
    display: none !important;
  }

  body:not(.printing-report) .modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  body:not(.printing-report) .modal {
    position: relative !important;
    margin: 0 auto !important;
    width: 80mm !important;
    max-width: 100% !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    visibility: visible !important;
  }

  /* 4. Thermal Receipt Specifics */
  #print-receipt, .receipt-box {
    width: 100% !important;
    max-width: 80mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: visible !important;
    display: block !important;
  }

  /* 5. Handling Reports (A4/Letter) */
  body.printing-report .sidebar,
  body.printing-report .top-nav,
  body.printing-report .modal-overlay:not(.force-print) {
    display: none !important;
  }

  body.printing-report .main-content {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Ensure all text is black for high contrast */
  * {
    -webkit-print-color-adjust: economy !important;
    print-color-adjust: economy !important;
    text-shadow: none !important;
  }

  /* Force background adjustment for images/icons if needed */
  .receipt-box *, .badge, [style*="background"] {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

.receipt-box {
  width: 320px;
  background: #fff;
  color: #000;
  padding: 15px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  text-align: left;
  line-height: 1.5;
}
.receipt-box hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.receipt-box h2 { font-size: 14px; margin: 0 0 5px; font-weight: bold; text-align: center; }
.receipt-table { width: 100%; text-align: left; margin: 8px 0; border-collapse: collapse; }
.receipt-table th, .receipt-table td { padding: 3px 0; }
.receipt-table th { border-bottom: 1px dashed #000; font-weight: bold; }
.receipt-footer { display: flex; justify-content: space-between; font-weight: bold; margin-top: 4px; }


/* ======================== CORPORATE GODOWN UI ======================== */
.godown-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: flex-start;
}

.inventory-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.item-card-v2 {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card-v2:hover {
  border-color: var(--godown-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-elevated);
  width: fit-content;
}

.summary-pane {
  position: sticky;
  top: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xl);
}

.entry-row {
  display: grid;
  grid-template-columns: 1fr 100px 120px 140px 40px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.entry-row:hover {
  border-color: var(--border-focus);
}

.corporate-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step.active {
  color: var(--godown-primary);
}

.step-divider {
  height: 1px;
  flex: 1 1;
  background: var(--border);
}

.stats-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--error); }

@media (max-width: 1024px) {
  .godown-layout {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* globals.css edits for PDF compatibility */
@media print {
  .printing-report .page-header,
  .printing-report .sidebar,
  .printing-report .nav-tabs,
  .printing-report .btn,
  .printing-report .no-print {
    display: none !important;
  }
  
  .printing-report .page-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  .printing-report .card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* html2canvas specific overrides */
.html2pdf__container {
  font-family: 'Inter', sans-serif !important;
}

#print-receipt, 
#sales-report-content, 
#expense-report-content, 
#vouchers-report-content, 
#stock-report-content, 
#inventory-content, 
#shift-close-content,
#sync-status-content {
  background: white !important;
  color: black !important;
}

/* Ensure backgrounds are captured */
.printing-report * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[15].oneOf[5].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[15].oneOf[5].use[3]!./src/app/page.module.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************/
/* Unused - all styles are in globals.css */

