/* CSS Design System for iNando Store ERP */

:root {
  /* Fonts */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Transition timings */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Theme variables */
html[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --card-glow: 0 0 20px rgba(99, 102, 241, 0.05);
}

html[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.10);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.06);
  --accent-cyan: #0891b2;
  --accent-purple: #9333ea;
  --card-glow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Utility styles */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.accent { color: var(--primary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Loading Spinner */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: 100%;
}
.toast {
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(120%);
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }
@keyframes slideIn {
  to { transform: translateX(0); }
}
.toast-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.toast-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 12px var(--primary-glow);
}
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--border-color);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--primary-glow);
  color: var(--primary);
}
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover {
  opacity: 0.9;
}
.btn-icon {
  padding: 8px;
  border-radius: 50%;
  aspect-ratio: 1;
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.btn-icon:hover {
  background: var(--border-color);
  color: var(--text-primary);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.text-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.text-link:hover {
  color: var(--primary-hover);
}

/* Auth Section */
.auth-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #030712 100%);
  z-index: 990;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--card-glow);
}
.auth-header {
  text-align: center;
  margin-bottom: 30px;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-icon-badge {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.auth-form h3 {
  text-align: center;
  font-size: 18px;
  margin-bottom: 8px;
}
.auth-form p.description {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-footer-info {
  margin-top: 24px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
}

/* Sidebar */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
}
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}
.role-badge {
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}
.sidebar-profile .avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.sidebar-profile .profile-info h4 {
  font-size: 13px;
  font-weight: 600;
}
.sidebar-profile .profile-info p {
  font-size: 11px;
  color: var(--text-secondary);
}
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}
.nav-item svg {
  transition: stroke var(--transition-fast);
}
.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--primary);
  color: white;
}
.nav-item.active svg {
  stroke: white;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}
.btn-logout {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Workspace */
.workspace {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-primary);
}
.workspace-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.header-left h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}
.header-left p {
  font-size: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Notifications Panel */
.notification-bell-wrapper {
  position: relative;
}
.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid var(--bg-secondary);
}
.notification-panel {
  position: absolute;
  top: 45px;
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 900;
}
.notification-panel.active {
  display: block;
}
.panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-header h3 {
  font-size: 14px;
  font-weight: 600;
}
.panel-body {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}
.notification-item {
  padding: 12px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.notification-item:hover {
  background: var(--bg-tertiary);
}
.notification-item:last-child {
  border-bottom: none;
}
.notification-item .time {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}
.empty-state {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Viewport content grid */
.viewport-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Dashboard Widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--card-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform var(--transition-fast);
}
.metric-card:hover {
  transform: translateY(-2px);
}
.metric-info h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.metric-info .val {
  font-size: 26px;
  font-weight: 800;
  line-weight: 1.2;
}
.metric-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
}
.chart-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}
.chart-container {
  height: 280px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Columns grid */
.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.card-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
}
.card-list h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Data Tables */
.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 2px 12px;
  max-width: 380px;
  width: 100%;
}
.search-bar svg {
  color: var(--text-secondary);
}
.search-bar input {
  border: none;
  background: transparent;
  padding: 8px 0;
}
.search-bar input:focus {
  box-shadow: none;
}
.filters-row {
  display: flex;
  gap: 12px;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
thead {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
th {
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-secondary);
}
td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: var(--bg-secondary);
}

/* Badges */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 108, 108, 0.1); color: var(--danger); }
.badge-info { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  padding: 24px;
}
.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-card.large {
  max-width: 900px;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.modal-body-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Grid layout for Forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* POS Screen */
.pos-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  height: calc(100vh - 170px);
}
.pos-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  padding-right: 8px;
}
.pos-right {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: var(--shadow-md);
}
.pos-search-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
}
.barcode-simulator {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.pos-cart-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-tertiary);
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}
.cart-item-info h4 {
  font-size: 13px;
  font-weight: 600;
}
.cart-item-info p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.cart-item-price {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-item-price span {
  font-size: 14px;
  font-weight: 700;
}

/* POS summary section */
.pos-summary {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.summary-row.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
  margin-top: 8px;
}

/* Activity Logs List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-card {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-size: 13px;
}
.activity-card-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 6px;
}

/* QR Code Display Card */
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  color: #0f172a;
  border-radius: var(--border-radius-md);
  margin: 0 auto;
  max-width: 260px;
  border: 1px solid #e2e8f0;
}
.qr-card canvas {
  width: 150px;
  height: 150px;
}

/* CRM Client Profile purchases log */
.purchases-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.purchase-history-item {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.purchase-history-item-left h4 {
  font-size: 14px;
}
.purchase-history-item-left p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* DRE Layout styling */
.dre-table {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}
.dre-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.dre-row.indent {
  padding-left: 40px;
  color: var(--text-secondary);
}
.dre-row.total-line {
  font-weight: 700;
  background: var(--bg-secondary);
}
.dre-row.net-profit {
  font-size: 16px;
  font-weight: 800;
  background: var(--primary-glow);
  color: var(--primary);
  border-bottom: none;
}

/* Image Upload Preview */
.image-uploader-box {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.image-uploader-box:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.image-previews {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.img-preview-item {
  width: 70px;
  height: 70px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Print Thermal styling overrides */
.thermal-receipt {
  display: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #000;
  padding: 10px;
  background: #fff;
}
.receipt-header {
  text-align: center;
  border-bottom: 1px dashed #000;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.receipt-header h2 {
  font-size: 14px;
  font-weight: bold;
}
.receipt-divider {
  border-top: 1px dashed #000;
  margin: 6px 0;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
}
.receipt-items-table {
  width: 100%;
  margin: 8px 0;
}
.receipt-items-table th, .receipt-items-table td {
  padding: 2px 0;
  font-size: 11px;
  color: #000;
  border: none;
}
.receipt-footer {
  text-align: center;
  margin-top: 16px;
  border-top: 1px dashed #000;
  padding-top: 8px;
  font-size: 10px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #thermal-receipt, #thermal-receipt * {
    visibility: visible;
  }
  #thermal-receipt {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
  }
}

/* Responsive queries */
@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 200px 1fr;
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .pos-layout {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* Mobile toggle button */
.btn-menu {
  display: none !important;
}

@media (max-width: 768px) {
  .btn-menu {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  html, body, .app-layout {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
  }
  .app-layout {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
  }
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    transition: opacity 0.3s ease;
  }
  .sidebar-overlay.active {
    display: block;
  }
  
  .workspace {
    padding: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
  }
  
  .workspace-header {
    height: 64px !important;
    padding: 0 16px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
  }
  
  .viewport-content {
    padding: 16px !important;
    flex: 1 !important;
    overflow-y: auto !important;
  }
  
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
  }
  
  .pos-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr !important;
  }
  .dashboard-columns {
    grid-template-columns: 1fr !important;
  }
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}
