/* Custom styles for Apex Distribution Portal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Table styling */
.data-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.data-table tr:hover td {
  background-color: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.badge-paid {
  background-color: #dcfce7;
  color: #15803d;
}

.badge-partial {
  background-color: #fef9c3;
  color: #a16207;
}

.badge-issued {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-cancelled {
  background-color: #f1f5f9;
  color: #64748b;
  text-decoration: line-through;
}

.badge-danger {
  background-color: #fee2e2;
  color: #b91c1c;
}

.badge-warning {
  background-color: #ffedd5;
  color: #c2410c;
}

.badge-success {
  background-color: #ecfdf5;
  color: #047857;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print Invoice Stylesheet */
@media print {
  body * {
    visibility: hidden;
  }
  #printableInvoice, #printableInvoice * {
    visibility: visible;
  }
  #printableInvoice {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: white;
  }
  .no-print {
    display: none !important;
  }
}

/* Mobile & PWA Optimization Styles */
.safe-bottom {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* On phones: prevent auto-zoom on input focus */
@media screen and (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
  
  .mobile-nav-btn.active {
    color: #2563eb !important;
  }
  .mobile-nav-btn.active i {
    transform: scale(1.15);
  }
}

/* Hide Netlify Badge Frame */
#nl-badge-frame {
  display: none !important;
}

/* Modal Dialog Scrolling & Backdrop Polish */
.modal-card {
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Custom sleek scrollbar for modal dialogs */
.modal-card::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
  border-radius: 9999px;
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 9999px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.9);
}

body.modal-open {
  overflow: hidden !important;
}


