/* SunPulse Energy Solar Portal Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-dark: #b45309;
  --secondary: #10b981;
  --dark-bg: #0b1120;
  --dark-surface: #1e293b;
  --dark-border: #334155;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

/* Glassmorphism Cards */
.glass-panel {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Kanban Board Column */
.kanban-column {
  min-width: 280px;
  max-width: 320px;
}

/* ================= EXACT A4 PROPOSAL & DOSSIER STYLES ================= */
#modal-quotation-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 16px 0;
  box-sizing: border-box;
}

.a4-page {
  width: 210mm !important;
  max-width: 210mm !important;
  min-width: 210mm !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  margin: 0 auto 24px auto !important;
  padding: 24px 28px !important;
  background: #ffffff;
  position: relative !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  color-adjust: exact !important;
}

.page-1 {
  background-color: #0f172a;
  color: #ffffff !important;
}

@media print {
  @page {
    size: 210mm 297mm;
    margin: 0mm;
  }
  
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html, body {
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff;
  }
  
  header, footer, nav, button, .no-print, body > *:not(#modal-quotation-viewer) {
    display: none !important;
  }
  
  #modal-quotation-viewer {
    position: static !important;
    inset: auto !important;
    background: #ffffff;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    width: 210mm !important;
    overflow: visible !important;
    display: block !important;
  }

  #modal-quotation-viewer > div {
    max-width: 210mm !important;
    width: 210mm !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #modal-quotation-content {
    background: #ffffff;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    width: 210mm !important;
    display: block !important;
  }

  .a4-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    padding: 24px 28px !important;
    box-shadow: none !important;
    border: none !important;
    page-break-inside: avoid !important;
    page-break-after: always !important;
    break-after: page !important;
  }
}


/* ================= MOBILE RESPONSIVE PREVIEW FOR A4 DOSSIERS ================= */
@media screen and (max-width: 768px) {
  #modal-quotation-content,
  #modal-invoice-content,
  #modal-warranty-content {
    padding: 4px !important;
    width: 100% !important;
    align-items: stretch !important;
  }

  .a4-page {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    margin: 0 0 16px 0 !important;
    padding: 14px 10px !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4) !important;
    overflow: visible !important;
  }

  .a4-page .grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .a4-page .text-2xl,
  .a4-page .text-3xl {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
  }

  .a4-page .text-xl {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
  }

  .a4-page table {
    display: table !important;
    width: 100% !important;
    font-size: 9px !important;
  }

  .a4-page th,
  .a4-page td {
    padding: 6px 4px !important;
  }

  .a4-page .border-l {
    border-left: none !important;
    border-top: 1px solid rgba(226, 232, 240, 0.3) !important;
    padding-left: 0 !important;
    padding-top: 8px !important;
  }
}
