:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --border: #e5e7eb;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --pwa-green: #4CAF50;
  --pwa-green-dark: #45a049;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px;
  background: #1a1a1a;
  border-right: 1px solid #333;
  position: fixed;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

/* Sidebar Header */
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #333;
  background: #1a1a1a;
  color: white;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 24px;
  background: #333;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #444;
}

.brand-text {
  flex: 1;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 12px;
  color: #999;
  margin: 0;
  font-weight: 400;
}

/* User Section */
.user-section {
  padding: 20px;
  border-bottom: 1px solid #333;
  background: #1a1a1a;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  border: 2px solid #444;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0;
}

.user-role {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  color: #ccc;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  background: #2a2a2a;
  color: white;
  border-left-color: #666;
}

.nav-link.active {
  background: #333;
  color: white;
  border-left-color: #007bff;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #007bff;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  opacity: 0.8;
}

.nav-text {
  font-weight: 500;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  opacity: 1;
}


.main { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  margin-left: 280px; /* Account for fixed sidebar width */
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; cursor: pointer; }
.topnav .btn { color: white; background: var(--primary); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.topnav .btn:hover { background: var(--primary-600); }
.topnav .user { color: var(--muted); margin-right: 12px; }

.content { padding: 20px; }
.footer { padding: 16px 20px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.card h3 { margin: 0 0 8px 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.stat { font-size: 28px; font-weight: 700; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.02em; }

.actions { display: flex; gap: 8px; }
.btn-primary { background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; text-decoration: none; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 8px 12px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.btn-outline:hover { background: #eef2ff; }

.form { display: grid; gap: 12px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fff; width: 100%;
}

/* Payment type radio buttons styling */
.payment-type-options {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}

.payment-type-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-type-option:hover {
  border-color: var(--primary);
  background: #f0f4ff;
}

.payment-type-option input[type="radio"] {
  width: auto;
  margin: 0;
}

.payment-type-option input[type="radio"]:checked + label {
  color: var(--primary);
  font-weight: 600;
}

.payment-type-option.selected {
  border-color: var(--primary);
  background: #f0f4ff;
}

.flash-container { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.flash.success { background: #ecfdf5; border-color: #bbf7d0; color: var(--success); }
.flash.info { background: #eff6ff; border-color: #bfdbfe; color: var(--primary); }
.flash.warning { background: #fffbeb; border-color: #fde68a; color: var(--warning); }
.flash.danger { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

.hero { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 100%; max-width: 420px; }
.muted { color: var(--muted); }

/* Sales Report Highlighting Styles */
.sales-report-table .highlight-quantity {
  background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
  font-weight: 600;
  color: #01579b;
  border-left: 3px solid #0277bd;
  padding-left: 15px !important;
}

.sales-report-table .highlight-price {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  font-weight: 600;
  color: #4a148c;
  border-left: 3px solid #7b1fa2;
  padding-left: 15px !important;
}

.sales-report-table .highlight-total {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  font-weight: 700;
  color: #1b5e20;
  border-left: 3px solid #388e3c;
  padding-left: 15px !important;
  font-size: 14px;
}

.sales-report-table .grand-total {
  background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%) !important;
  color: #e65100 !important;
  border-left: 4px solid #ff9800 !important;
  font-size: 16px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sales-report-table .total-row {
  background: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.sales-report-table .total-row th {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sales-report-table tbody tr:hover .highlight-quantity,
.sales-report-table tbody tr:hover .highlight-price,
.sales-report-table tbody tr:hover .highlight-total {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Supplier Accounts Highlighting Styles */
.supplier-accounts-table .highlight-balance {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  font-weight: 700;
  color: #1b5e20;
  border-left: 3px solid #388e3c;
  padding-left: 15px !important;
  font-size: 14px;
}

.supplier-accounts-table .grand-total {
  background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%) !important;
  color: #e65100 !important;
  border-left: 4px solid #ff9800 !important;
  font-size: 16px !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.supplier-accounts-table .total-row {
  background: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.supplier-accounts-table .total-row th {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.supplier-accounts-table tbody tr:hover .highlight-balance {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Supplier Ledger Highlighting Styles */
.supplier-ledger-table .highlight-debit {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  font-weight: 600;
  color: #c62828;
  border-left: 3px solid #d32f2f;
  padding-left: 15px !important;
}

.supplier-ledger-table .highlight-credit {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  font-weight: 600;
  color: #1b5e20;
  border-left: 3px solid #388e3c;
  padding-left: 15px !important;
}

.supplier-ledger-table .highlight-balance {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  font-weight: 700;
  color: #0d47a1;
  border-left: 3px solid #1976d2;
  padding-left: 15px !important;
  font-size: 14px;
}

.entry-type {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.entry-type.sale {
  background: #e8f5e8;
  color: #1b5e20;
}

.entry-type.payment {
  background: #fff3e0;
  color: #e65100;
}

.balance-amount {
  font-size: 24px;
  font-weight: 700;
  color: #1b5e20;
  margin: 0;
}

/* Customer Balances Highlighting Styles */
.customer-balances-table .highlight-balance {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  font-weight: 700;
  color: #1b5e20;
  border-left: 3px solid #388e3c;
  padding-left: 15px !important;
  font-size: 14px;
}

.customer-balances-table tbody tr:hover .highlight-balance {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Enhanced Customer Balances Styling */
.customer-balances-table tbody tr {
  transition: all 0.2s ease;
}

.customer-balances-table tbody tr:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.customer-balances-table tbody tr:hover td {
  border-color: #e3f2fd;
}

/* Search form styling */
.customer-balances-table .field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Customer avatar styling */
.customer-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Status badges */
.status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: #e8f5e8;
  color: #1b5e20;
}

.status-badge.inactive {
  background: #ffebee;
  color: #c62828;
}

/* Order count badge */
.order-count-badge {
  background: #f0f4ff;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Summary cards */
.summary-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  color: white;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.summary-card .summary-label {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .summary-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

/* Dropdown Filter Styles */
.dropdown-container {
  position: relative;
  width: 100%;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:active {
  background-color: #e3f2fd;
}

/* Custom scrollbar for dropdown */
.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Mobile-First Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .sidebar {
    width: 260px;
  }
  
  .main {
    margin-left: 260px;
  }
  
  .content {
    padding: 16px;
  }
  
  .grid.cols-3 { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
  }
  
  .grid.cols-2 { 
    grid-template-columns: 1fr; 
  }
}

/* Tablets */
@media (max-width: 768px) {
  .sidebar { 
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 280px;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main { 
    margin-left: 0; 
  }
  
  /* Mobile overlay */
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }
  
  .mobile-overlay.show {
    display: block;
  }
  
  .content {
    padding: 12px;
  }
  
  .topbar {
    padding: 8px 12px;
  }
  
  .grid.cols-3 { 
    grid-template-columns: 1fr; 
  }
  
  .grid.cols-2 { 
    grid-template-columns: 1fr; 
  }
  
  /* Mobile Navigation Toggle */
  .mobile-menu-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
    z-index: 1001;
    position: relative;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
  }
  
  /* Table Responsive */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table {
    min-width: 600px;
  }
  
  .table th,
  .table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  /* Card adjustments */
  .card {
    padding: 12px;
    margin-top: 8px;
  }
  
  /* Form adjustments */
  .form {
    gap: 8px;
  }
  
  .field input,
  .field select {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  /* Button adjustments */
  .btn-primary,
  .btn-outline {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  .content {
    padding: 8px;
  }
  
  .topbar {
    padding: 6px 8px;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
  }
  
  .topbar .brand {
    font-size: 16px;
    flex: 1;
  }
  
  .topnav .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* Mobile hamburger menu */
  .mobile-menu-toggle {
    display: block !important;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 6px;
    margin-right: 8px;
    z-index: 1001;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-menu-toggle:hover {
    background: var(--primary-600);
  }
  
  .mobile-menu-toggle:active {
    background: var(--primary-600);
    transform: scale(0.95);
  }
  
  /* Header adjustments */
  h1, h2, h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  /* Card adjustments */
  .card {
    padding: 8px;
    border-radius: 8px;
  }
  
  /* Table mobile optimization */
  .table {
    min-width: 500px;
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  /* Sales report table mobile */
  .sales-report-table th,
  .sales-report-table td {
    padding: 4px 2px;
    font-size: 10px;
  }
  
  .sales-report-table .highlight-quantity,
  .sales-report-table .highlight-price,
  .sales-report-table .highlight-total {
    padding-left: 8px !important;
    font-size: 11px;
  }
  
  /* Customer balances table mobile */
  .customer-balances-table th,
  .customer-balances-table td {
    padding: 4px 2px;
    font-size: 10px;
  }
  
  .customer-balances-table .highlight-balance {
    padding-left: 8px !important;
    font-size: 11px;
  }
  
  /* Form mobile optimization */
  .form {
    gap: 6px;
  }
  
  .field input,
  .field select,
  .field textarea {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  /* Button mobile optimization */
  .btn-primary,
  .btn-outline {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
  }
  
  /* Dropdown mobile optimization */
  .dropdown-menu {
    max-height: 150px;
    font-size: 12px;
  }
  
  .dropdown-item {
    padding: 8px 12px;
  }
  
  /* Search form mobile */
  .search-form-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  /* Summary cards mobile */
  .summary-card {
    padding: 12px;
  }
  
  .summary-card .summary-label {
    font-size: 10px;
  }
  
  .summary-card .summary-value {
    font-size: 18px;
  }
  
  /* Grid mobile */
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  /* Actions mobile */
  .actions {
    flex-direction: column;
    gap: 4px;
  }
  
  .actions .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Flash messages mobile */
  .flash {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* Hero section mobile */
  .hero {
    min-height: calc(100vh - 100px);
    padding: 20px;
  }
  
  .login-card {
    padding: 16px;
    margin: 0 8px;
  }
  
  /* Mobile-specific sales page optimizations */
  .mobile-sales-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .mobile-sales-header h2 {
    font-size: 20px;
    margin: 0;
  }
  
  .mobile-sales-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .mobile-sales-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }
  
  /* Mobile inventory alert */
  .mobile-inventory-alert {
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .mobile-inventory-alert h4 {
    font-size: 14px;
    margin: 0;
  }
  
  .mobile-inventory-alert p {
    font-size: 12px;
    margin: 0;
  }
  
  .mobile-inventory-alert .btn {
    align-self: flex-start;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  /* Mobile table container */
  .mobile-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  /* Mobile sales table */
  .mobile-sales-table {
    min-width: 600px;
    font-size: 11px;
  }
  
  .mobile-sales-table th,
  .mobile-sales-table td {
    padding: 8px 4px;
    white-space: nowrap;
  }
  
  .mobile-sales-table th {
    font-size: 10px;
    font-weight: 600;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  /* Mobile customer balances */
  .mobile-customer-balances {
    margin-top: 16px;
  }
  
  .mobile-customer-balances h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  
  /* Mobile summary grid */
  .mobile-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  
  .mobile-summary-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
  }
  
  .mobile-summary-item .label {
    font-size: 10px;
    opacity: 0.9;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  
  .mobile-summary-item .value {
    font-size: 16px;
    font-weight: 700;
  }
}

/* Extra Small Mobile Devices */
@media (max-width: 360px) {
  .content {
    padding: 4px;
  }
  
  .card {
    padding: 6px;
  }
  
  .table {
    min-width: 400px;
    font-size: 10px;
  }
  
  .table th,
  .table td {
    padding: 4px 2px;
    font-size: 9px;
  }
  
  .btn-primary,
  .btn-outline {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  h1, h2, h3 {
    font-size: 16px;
  }
  
  .summary-card .summary-value {
    font-size: 16px;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar {
    width: 240px;
  }
  
  .content {
    padding: 8px;
  }
  
  .hero {
    min-height: calc(100vh - 80px);
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .btn-outline {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  .dropdown-item {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  .table th,
  .table td {
    min-height: 44px;
    padding: 12px 8px;
  }
  
  .nav-link {
    min-height: 48px;
    padding: 16px 20px;
  }
  
  .mobile-menu-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  /* Ensure hamburger menu is always visible on mobile */
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve touch targets */
  .btn-primary,
  .btn-outline {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  /* Better mobile table scrolling */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .table-responsive::-webkit-scrollbar {
    height: 6px;
  }
  
  .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  .table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }
  
  .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }
}

/* PWA Install Button Styles */
.install-btn {
  background: linear-gradient(135deg, var(--pwa-green), var(--pwa-green-dark));
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  cursor: pointer;
  margin-right: 0.8rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, var(--pwa-green-dark), var(--pwa-green));
}

.install-btn i {
  font-size: 0.9rem;
}

/* Mobile responsive install button */
@media (max-width: 768px) {
  .install-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
  }
  
  .install-btn i {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .install-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    margin-right: 0.3rem;
  }
  
  .install-btn i {
    font-size: 0.75rem;
  }
}


