/* Downtime & Jumper Relief Dashboard Styles */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-family: 'Kantumruy Pro', 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-khmer: 'Kantumruy Pro', sans-serif;
  --color-primary: #1e40af;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #3b82f6;
  --color-accent: #0d9488;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-border: #e2e8f0;
}

body {
  font-family: var(--font-family);
  background-color: #f1f5f9;
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
}

body.font-khmer {
  font-family: var(--font-family-khmer);
}

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

/* Status Badges */
.badge-available {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-busy {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Live Active Swap Card ticking badge */
.live-pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: live-pulse 1.2s infinite ease-in-out;
}

@keyframes live-pulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

/* Jumper Avatar Ring */
.jumper-avatar {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Modern Card Shadows */
.card-modern {
  background: #ffffff;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-modern:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

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

.custom-table th {
  background-color: #f8fafc;
  color: #334155;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.custom-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.925rem;
  color: #1e293b;
}

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

/* Tab active indicator */
.tab-btn.active {
  color: #1d4ed8;
  border-bottom: 3px solid #2563eb;
  font-weight: 600;
}

/* Autocomplete Dropdown Styling */
.autocomplete-item {
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #eff6ff;
}

.autocomplete-item mark {
  background-color: #fef08a;
  color: #1e3a8a;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 2px;
}

/* Modal styles using modern backdrop */
dialog:not([open]) {
  display: none !important;
}

dialog[open] {
  display: block;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

dialog {
  border: none;
  border-radius: 1rem;
  padding: 0;
  max-width: 95vw;
}

/* Print Stylesheet for Physical Reports */
@media print {
  body {
    background-color: #ffffff;
    font-size: 11pt;
  }
  .no-print, header, nav, .btn, .modal-trigger {
    display: none !important;
  }
  .card-modern {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  .print-page-break {
    page-break-before: always;
  }
}
