@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/jameel-noori@1.1.2/jameel-noori.min.css');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    background-color: #f7fafc;
    color: #1e1e1e;
    font-family: 'Montserrat', 'Inter', sans-serif;
  }
}

.font-nastaliq {
  font-family: 'JameelNooriNastaliq', 'Noto Nastaliq Urdu', serif;
}

/* Premium Animations & Micro-interactions */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulseBorder {
  0%, 100% {
    border-color: rgba(234, 85, 71, 0.4);
  }
  50% {
    border-color: rgba(234, 85, 71, 1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 0.35s ease-out forwards;
}

.pulse-border-red {
  animation: pulseBorder 2s infinite ease-in-out;
}

/* Glassmorphism Styles */
.premium-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.premium-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -10px rgba(104, 72, 47, 0.15);
}

.premium-sidebar-link {
  position: relative;
  transition: all 0.25s ease;
}

.premium-sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background-color: #fdc62c;
  border-radius: 0 4px 4px 0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.premium-sidebar-link-active::before {
  transform: scaleY(1);
}

.premium-sidebar-link-active {
  background-color: rgba(234, 85, 71, 0.15) !important;
  border-left: 4px solid #fdc62c;
  color: #fdc62c !important;
}

/* Print Form Styling (For digital performa view) */
.dha-performa-bg {
  background: radial-gradient(circle at 10% 20%, rgba(253, 198, 44, 0.05) 0%, rgba(234, 85, 71, 0.02) 90%);
}

@media print {
  .hide-on-print {
    display: none !important;
  }

  /* Prevent row and cell splitting mid-text across pages */
  tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  th, td {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  thead {
    display: table-header-group !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  tfoot {
    display: table-footer-group !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* When printing report modals, unwrap fixed overlays into normal document flow */
  .report-modal-wrapper {
    position: static !important;
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    box-shadow: none !important;
    inset: auto !important;
    z-index: auto !important;
  }

  #report-print-area {
    position: static !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
