/* Custom styles beyond Tailwind - Modern Mobile-First Design */

/* Root Variables */
:root {
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --header-height: 64px;
  --bottom-nav-height: 64px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent content overflow */
#app-shell,
#main-content,
#page-container {
  overflow-x: hidden;
  max-width: 100%;
}

/* Safe Area for iOS Devices */
.safe-area-bottom {
  padding-bottom: calc(16px + var(--safe-area-inset-bottom));
}

/* Toast notifications - Modern Design */
.toast {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  transform: translateX(120%) scale(0.9);
  opacity: 0;
  width: 100%;
  max-width: 360px;
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.toast.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

/* Loading spinner */
@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* Modern Card Styles */
.modern-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modern-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.modern-card:active {
  transform: scale(0.98);
}

/* Glass Morphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-effect {
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Desktop layout with cart sidebar */
@media (min-width: 768px) {

  #main-content,
  .container {
    margin-right: 384px;
    width: auto;
    max-width: none;
  }

  #order-sidebar {
    border-left: 1px solid #e5e7eb;
    display: block !important;
  }
}

/* Mobile-specific fixes for cart */
@media (max-width: 767px) {

  /* Modern bottom navbar styling */
  #bottom-nav {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  /* Active state for bottom nav */
  .nav-btn.active {
    color: #6366f1 !important;
  }

  .nav-btn.active .nav-indicator {
    opacity: 1 !important;
    width: 20px;
  }

  .nav-btn.active[data-page="billing"] {
    color: white !important;
  }

  /* Improved touch feedback */
  .nav-btn:active {
    opacity: 0.7;
  }

  /* Cart button special styling */
  .nav-btn[data-page="billing"] {
    position: relative;
  }

  .nav-btn[data-page="billing"] .cart-count {
    position: absolute;
    top: 2px;
    right: 50%;
    margin-right: -20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 9999px;
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
  }
}

/* Pull-to-refresh indicator */
.ptr-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.9);
  color: white;
  border-radius: 0 0 12px 12px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 100;
}

/* Barcode scanner overlay - Modern Design */
.scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.scanner-viewport {
  width: 85%;
  max-width: 500px;
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.scanner-target {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 40%;
  border: 3px solid #6366f1;
  border-radius: 12px;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.5);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7), 0 0 0 4000px rgba(0, 0, 0, 0.6);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(99, 102, 241, 0), 0 0 0 4000px rgba(0, 0, 0, 0.6);
  }
}

/* Form styles - Modern Input Design */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  letter-spacing: 0.01em;
}

.dark .form-label {
  color: #e5e7eb;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.form-control:focus {
  border-color: #6366f1;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background: white;
}

.form-control::placeholder {
  color: #9ca3af;
}

/* Dark mode form control */
.dark .form-control {
  background-color: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}

.dark .form-control:focus {
  border-color: #6366f1;
  background-color: #1f2937;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.dark .form-control::placeholder {
  color: #6b7280;
}

/* Responsive table - Modern Card-Based on Mobile */
.responsive-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0 1rem;
  width: calc(100% + 2rem);
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.dark .data-table {
  background: #1f2937;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.dark .data-table th,
.dark .data-table td {
  border-bottom-color: #374151;
}

.data-table thead th {
  background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
  font-weight: 700;
  color: #111827;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-width: 2px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.dark .data-table thead th {
  background: linear-gradient(to bottom, #374151, #1f2937);
  color: #e5e7eb;
  border-bottom-color: #4b5563;
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
  transform: scale(1.005);
}

.dark .data-table tbody tr:hover {
  background-color: #374151;
}

/* Mobile optimizations - Enhanced Touch Experience */
@media (max-width: 640px) {

  .data-table th,
  .data-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  /* Prevent zooming on inputs in iOS */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Mobile card layout for tables */
  .mobile-card-table {
    display: block;
  }

  .mobile-card-table tbody,
  .mobile-card-table tr {
    display: block;
    margin-bottom: 1rem;
  }

  .mobile-card-table tr {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1rem;
  }

  .dark .mobile-card-table tr {
    background: #1f2937;
  }
}

/* Improved touch targets (44px min for accessibility) */
@media (max-width: 640px) {

  .form-control,
  button,
  .btn,
  select,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"] {
    min-height: 48px;
  }

  .qty-btn {
    min-width: 48px;
    min-height: 48px;
  }
}

/* Active state for buttons on touch devices */
@media (hover: none) {

  button:active,
  .btn:active {
    opacity: 0.7;
    transform: scale(0.96);
    transition: all 0.1s ease;
  }
}

/* Card shadow effect - Enhanced Modern Design */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.card-hover:active {
  transform: translateY(-2px) scale(0.98);
}

/* Active navigation button - Modern Indicator */
.nav-btn.active {
  color: #6366f1 !important;
}

.nav-item.active {
  background: linear-gradient(to right, rgba(99, 102, 241, 0.1), transparent);
  color: #6366f1 !important;
  border-left: 3px solid #6366f1;
  font-weight: 600;
}

/* Button Styles - Modern & Consistent */
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: white;
  color: #6366f1;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  border: 2px solid #6366f1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  background: #6366f1;
  color: white;
  transform: translateY(-2px);
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: calc(80px + var(--safe-area-inset-bottom));
  right: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 40;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

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

@media (min-width: 768px) {
  .fab {
    bottom: 2rem;
  }
}

/* Skeleton Loading Animation */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
}

/* Ripple effect for touch feedback */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   TABLET & iPAD LAYOUT ADJUSTMENTS
   ============================================ */

/* ============================================
   PROFESSIONAL RECEIPT STYLES
   ============================================ */

/* Receipt Paper Look */
.receipt-paper {
  font-family: 'Courier New', 'Lucida Console', Monaco, monospace;
  background: #fff;
  color: #000;
  padding: 16px;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 
    0 1px 2px rgba(0,0,0,0.1),
    inset 0 0 40px rgba(0,0,0,0.02);
  position: relative;
}

.receipt-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    rgba(0,0,0,0.02) 50%,
    rgba(0,0,0,0.02) 100%
  );
  background-size: 100% 4px;
}

/* Receipt Header */
.receipt-header {
  text-align: center;
  padding-bottom: 12px;
}

.receipt-header .store-logo {
  margin-bottom: 8px;
}

.receipt-header .store-logo i {
  color: #6366f1;
}

.receipt-header .store-name {
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  color: #000;
}

.receipt-header .store-info {
  font-size: 11px;
  color: #555;
  margin: 2px 0;
}

/* Dividers */
.receipt-divider {
  border: none;
  border-top: 1px dashed #999;
  margin: 10px 0;
  height: 0;
}

.receipt-divider-thin {
  border: none;
  border-top: 1px solid #ddd;
  margin: 6px 0;
  height: 0;
}

/* Bill Info */
.bill-info {
  font-size: 12px;
  padding: 4px 0;
}

.bill-info-row {
  display: flex;
  justify-content: space-between;
  margin: 3px 0;
}

.bill-info-row .bill-number {
  font-weight: bold;
  color: #000;
}

/* Items Header */
.items-header {
  display: flex;
  font-weight: bold;
  font-size: 11px;
  padding: 6px 0;
  text-transform: uppercase;
  background: #f5f5f5;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.item-name-header { flex: 2; text-align: left; }
.item-qty-header { width: 35px; text-align: center; }
.item-rate-header { width: 55px; text-align: right; }
.item-amt-header { width: 65px; text-align: right; }

/* Receipt Items */
.receipt-items {
  padding: 8px 0;
}

.receipt-item {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dotted #eee;
}

.receipt-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.item-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2px;
}

.item-sno {
  width: 24px;
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}

.item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  word-wrap: break-word;
  line-height: 1.3;
}

.item-details {
  display: flex;
  padding-left: 24px;
  font-size: 12px;
  color: #444;
}

.item-qty {
  width: 35px;
  text-align: center;
}

.item-rate {
  width: 55px;
  text-align: right;
}

.item-amount {
  width: 65px;
  text-align: right;
  font-weight: bold;
  color: #000;
}

/* Receipt Totals */
.receipt-totals {
  padding: 8px 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 13px;
}

.total-row.discount-row {
  color: #dc2626;
}

.total-row.grand-total {
  font-size: 16px;
  font-weight: bold;
  padding: 10px 0;
  margin-top: 6px;
  background: linear-gradient(90deg, #f0f0f0, #fff, #f0f0f0);
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.grand-total-amount {
  font-size: 18px;
  color: #000;
}

/* Payment Info */
.payment-info {
  padding: 8px 0;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 4px 0;
}

.payment-method {
  font-weight: bold;
  text-transform: uppercase;
  color: #16a34a;
}

/* Receipt Footer */
.receipt-footer {
  text-align: center;
  padding: 12px 0;
}

.receipt-footer .thank-you {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #000;
}

.receipt-footer .footer-note {
  font-size: 10px;
  color: #888;
  font-style: italic;
  margin: 6px 0;
}

/* Barcode Area */
.barcode-area {
  margin-top: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.barcode-lines {
  display: block;
  height: 35px;
  width: 140px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 2px,
    transparent 2px,
    transparent 5px,
    #000 5px,
    #000 6px,
    transparent 6px,
    transparent 10px,
    #000 10px,
    #000 11px,
    transparent 11px,
    transparent 13px
  );
}

.barcode-text {
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 2px;
  color: #333;
}

/* Tear Line */
.tear-line {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  margin-top: 12px;
  letter-spacing: -1px;
}

/* Dark mode adjustments */
.dark .receipt-paper {
  background: #fff;
  color: #000;
}

/* Receipt Modal enhancements */
#receipt-modal .receipt-paper {
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.15),
    0 0 0 1px rgba(0,0,0,0.05);
}

/* ============================================
   END RECEIPT STYLES
   ============================================ */

/* Tablet breakpoint - show sidebar as overlay */
@media (min-width: 768px) and (max-width: 1024px) {
  #sidebar {
    position: fixed;
    z-index: 50;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  #main-content,
  .container {
    margin-right: 0;
    margin-left: 0;
    padding: 20px;
  }

  /* Hide cart sidebar on tablets - use bottom sheet instead */
  #order-sidebar {
    display: none !important;
  }

  /* Overlay when sidebar is open */
  #overlay {
    z-index: 45;
  }
}

/* Large tablets and iPad Pro landscape */
@media (min-width: 1024px) and (max-width: 1366px) {
  #sidebar {
    width: 260px;
    position: fixed;
  }

  #main-content,
  .container {
    margin-left: 260px;
    margin-right: 0;
    padding: 24px 32px;
  }

  /* Show cart sidebar on large tablets */
  #order-sidebar {
    display: block;
    width: 380px;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 30;
  }

  /* Adjust main content when cart is visible */
  body.billing-active #main-content {
    margin-right: 380px;
  }
}

/* FAB button tablet positioning */
@media (min-width: 768px) and (max-width: 1366px) {
  .fab {
    bottom: calc(90px + var(--safe-area-inset-bottom));
    right: 24px;
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
}

/* Toast positioning for tablets */
@media (min-width: 768px) and (max-width: 1366px) {
  .toast {
    max-width: 420px;
    bottom: 100px;
    right: 24px;
  }
}

/* Modal sizing for tablets */
@media (min-width: 768px) and (max-width: 1366px) {
  .modal > div,
  .modal-content,
  [class*="max-w-md"],
  [class*="max-w-lg"] {
    max-width: 560px !important;
    width: 90%;
    margin: 40px auto;
  }

  [class*="max-w-xl"],
  [class*="max-w-2xl"] {
    max-width: 720px !important;
    width: 90%;
  }
}

/* Scanner overlay for tablets */
@media (min-width: 768px) and (max-width: 1366px) {
  .scanner-viewport {
    width: 70%;
    max-width: 600px;
  }
}

/* ==========================================
   TABLET & iPad Specific Styles
   ========================================== */

/* Hide scrollbar but allow scrolling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Better table scrolling on tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Tablet landscape / iPad */
  #page-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Table improvements for tablets */
  table {
    font-size: 13px;
  }
  
  table th,
  table td {
    padding: 10px 12px;
  }

  /* Stats grid on tablets */
  .grid.grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Button sizes on tablets */
  button.px-4.py-2\.5 {
    padding: 10px 16px;
  }

  /* Search input on tablets */
  input[type="text"].pl-10 {
    padding-left: 40px;
    padding-right: 16px;
    height: 44px;
  }
}

/* iPad Pro / Large tablets */
@media (min-width: 1024px) and (max-width: 1366px) {
  #page-container {
    padding-left: 24px;
    padding-right: 24px;
    max-width: 1200px;
  }

  /* Stats grid shows 4 columns on large tablets */
  .grid.grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Better spacing for header actions */
  .flex.flex-wrap.gap-2.w-full.lg\:w-auto {
    gap: 12px;
  }
}

/* Portrait iPad mini / smaller tablets */
@media (min-width: 768px) and (max-width: 834px) {
  /* Compact view for smaller tablets */
  table th,
  table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Reduce stat card padding */
  .p-3.sm\:p-4 {
    padding: 10px;
  }

  /* Stack header on smaller tablets */
  .flex.flex-col.lg\:flex-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Better touch targets for tablets */
@media (pointer: coarse) {
  button,
  .btn,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Larger touch targets in tables */
  table button,
  table .btn {
    min-height: 36px;
    min-width: 36px;
    padding: 8px;
  }

  /* Better spacing for clickable rows */
  table tbody tr {
    cursor: pointer;
  }
}

/* iPad landscape sidebar adjustment */
@media (min-width: 1024px) and (max-width: 1366px) {
  #sidebar {
    width: 260px;
  }
  
  #main-content.md\:ml-\[280px\] {
    margin-left: 260px;
  }
}

/* Horizontal scroll indicator for tables on tablets */
@media (max-width: 1024px) {
  .overflow-x-auto {
    position: relative;
  }
  
  .overflow-x-auto::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .overflow-x-auto:hover::after {
    opacity: 1;
  }
  
  .dark .overflow-x-auto::after {
    background: linear-gradient(to left, rgba(31,41,55,0.9), transparent);
  }
}

/* Better modal display on tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .fixed.inset-0.z-50 > div {
    max-width: 90%;
    width: 600px;
    max-height: 85vh;
  }
}

/* Form inputs on tablets */
@media (min-width: 768px) and (max-width: 1366px) {
  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="email"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 14px;
  }
  
  .grid.grid-cols-2.gap-4 {
    gap: 16px;
  }
  
  .grid.grid-cols-3.gap-4 {
    gap: 16px;
  }
}