/* Custom Stylesheet for Property & Home Insurance & Claim System */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-display: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-primary: #1e3a8a;
  --color-primary-light: #3b82f6;
  --color-secondary: #0d9488;
  --color-accent: #f59e0b;
  --color-danger: #ef4444;
  --color-success: #10b981;
  
  --bg-app: #f8fafc;
  --sidebar-width: 280px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

/* Glassmorphism & UI Accents */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.sidebar-gradient {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.brand-gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

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

/* Status Badges */
.badge-status {
  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;
}

.status-active { background: #dcfce7; color: #15803d; }
.status-expired { background: #f1f5f9; color: #64748b; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.status-submitted { background: #e0f2fe; color: #0369a1; }
.status-surveyor-assigned { background: #fef3c7; color: #b45309; }
.status-under-assessment { background: #ede9fe; color: #6d28d9; }
.status-approved { background: #dcfce7; color: #15803d; }
.status-rejected { background: #fee2e2; color: #b91c1c; }
.status-paid { background: #ccfbf1; color: #0f766e; }
.status-closed { background: #f1f5f9; color: #334155; }

/* Risk Class Indicators */
.risk-class-1 { border-left: 4px solid #10b981; }
.risk-class-2 { border-left: 4px solid #f59e0b; }
.risk-class-3 { border-left: 4px solid #ef4444; }

/* Map Container */
.leaflet-container {
  font-family: var(--font-body);
  border-radius: 0.75rem;
  z-index: 10;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.animate-scale-up {
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal and Drawer Backdrop */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Print Stylesheet for Official Certificates & Receipts */
@media print {
  body * {
    visibility: hidden;
  }
  
  #printable-document-container,
  #printable-document-container * {
    visibility: visible;
  }
  
  #printable-document-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20mm;
    background: white;
    box-shadow: none !important;
  }

  .no-print {
    display: none !important;
  }

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

/* Form Input Focus Enhancement */
.form-input-custom:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Table Hover */
.table-row-hover:hover {
  background-color: #f8fafc;
}
