/* NETD IT SOLUTIONS - Modern App Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Lao:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-sans: 'Inter', 'Noto Sans Lao', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;

  --sidebar-width: 260px;
}

* {
  font-family: var(--font-sans);
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.dark body {
  background-color: #0b0f19;
  color: #f1f5f9;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism & Surface utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .glass-panel {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.card-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.dark .card-hover:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
}

/* Table styles */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.custom-table th {
  background-color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.dark .custom-table th {
  background-color: #1e293b;
  color: #94a3b8;
  border-bottom: 1px solid #334155;
}

.custom-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.dark .custom-table td {
  border-bottom: 1px solid #1e293b;
}

.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

.dark .custom-table tbody tr:hover {
  background-color: #1e293b55;
}

/* Modals */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out forwards;
}

.modal-content {
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* PRINT STYLES FOR A4 INVOICES & QUOTATIONS */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide everything except print preview modal content */
  #app-sidebar,
  #app-header,
  #main-content,
  #toast-container,
  .no-print,
  .modal-backdrop:not(#print-preview-modal),
  #print-preview-modal .no-print {
    display: none !important;
  }

  #print-preview-modal {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #print-preview-modal .modal-content {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  #print-preview-content {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .print-page {
    width: 100% !important;
    max-width: 210mm !important;
    min-height: 297mm !important;
    padding: 8mm 10mm !important;
    margin: 0 auto !important;
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    page-break-after: auto;
  }

  @page {
    size: A4 portrait;
    margin: 8mm;
  }
}

/* Barcode label styling */
.barcode-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: white;
}
