@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================
   DESIGN TOKENS – Soft Light & Forest Green Palette
   ============================================ */
:root {
  --forest-800: #065f46;   /* emerald-800 */
  --forest-700: #047857;   /* emerald-700 – primary forest green accent */
  --forest-600: #059669;   /* emerald-600 */
  --forest-500: #10b981;   /* emerald-500 */
  --forest-100: #dcfce7;   /* emerald-100 */
  --forest-50:  #f0fdf4;   /* emerald-50 */

  --text-primary:   #1f2937; /* gray-800 */
  --text-secondary: #4b5563; /* gray-600 */
  --text-muted:     #6b7280; /* gray-500 */
  --text-light:     #9ca3af; /* gray-400 */

  --bg-page:        #f8fafc; /* slate-50 */
  --bg-card:        #ffffff; /* pure white */
  --border-light:   #e5e7eb; /* gray-200 */
  --border-medium:  #d1d5db; /* gray-300 */

  --sidebar-bg:     #ffffff;
  --sidebar-border: #e5e7eb;
  --header-bg:      #ffffff;
  --header-border:  #e5e7eb;
}

/* ============================================
   GLOBAL RESET TO LIGHT MODE
   ============================================ */
html {
  color-scheme: light !important;
  background-color: var(--bg-page) !important;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page) !important;
  color: var(--text-primary) !important;
  margin: 0;
  padding: 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.font-serif-accent {
  font-family: 'Merriweather', Georgia, serif;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

/* ============================================
   CUSTOM SCROLLBAR (light mode)
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================
   SIDEBAR & HEADER
   ============================================ */
.glass-sidebar {
  background: var(--sidebar-bg) !important;
  border-right: 1px solid var(--sidebar-border) !important;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: none !important;
}

.glass-header {
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--header-border) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: none !important;
}

/* ============================================
   CARDS & PANELS (Pure white, border gray-200)
   ============================================ */
.glass-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--text-primary);
}

.glass-panel-hover {
  transition: all 0.2s ease;
}
.glass-panel-hover:hover {
  border-color: #a7f3d0 !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.08) !important;
  transform: translateY(-1px);
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */
.nav-btn {
  color: var(--text-secondary) !important;
  border-radius: 0.75rem;
  transition: all 0.15s ease-in-out;
}
.nav-btn:hover {
  background: var(--forest-50) !important;
  color: var(--forest-700) !important;
}
.nav-btn.active {
  background: var(--forest-50) !important;
  color: var(--forest-700) !important;
  border: 1px solid #bbf7d0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* ============================================
   FORM INPUTS & CONTROLS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
  background-color: #ffffff !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 0.75rem;
  transition: all 0.15s ease-in-out;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest-700) !important;
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12) !important;
  outline: none !important;
}

/* ============================================
   CUSTOM TABLE STYLING
   ============================================ */
.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  background-color: #f9fafb !important;
  color: var(--text-secondary) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light) !important;
}

.custom-table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.75rem;
}

.custom-table tr:hover td {
  background-color: var(--forest-50) !important;
}

/* ============================================
   PRIMARY & ACCENT BUTTONS
   ============================================ */
.btn-primary,
button.bg-emerald-700,
button.bg-emerald-600 {
  background-color: var(--forest-700) !important;
  color: #ffffff !important;
}
button.bg-emerald-700:hover,
button.bg-emerald-600:hover {
  background-color: var(--forest-800) !important;
}

/* Preserve crisp white text on colored buttons and badges */
.text-white {
  color: #ffffff;
}

/* Urgent banner light palette */
#urgentCasesBanner {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
  background-image: none !important;
}

/* ============================================
   STATUS & URGENSI BADGES
   ============================================ */
.badge-merah {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}
.badge-kuning {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
}
.badge-hijau {
  background-color: #dcfce7 !important;
  color: var(--forest-700) !important;
  border: 1px solid #86efac !important;
}

/* ============================================
   MODALS
   ============================================ */
.glass-panel.w-full.max-w-xl,
.glass-panel.w-full.max-w-2xl,
.glass-panel.w-full.max-w-3xl,
.glass-panel.w-full.max-w-md,
.glass-panel.w-full.max-w-sm {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Pulse animation */
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.pulse-red-dot {
  animation: pulse-red 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  aside, header, #actionButtons, .no-print {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .glass-panel {
    background: transparent !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
    box-shadow: none !important;
  }
  .custom-table th {
    background-color: #eeeeee !important;
    color: #000000 !important;
  }
  .custom-table td {
    border-top: 1px solid #dddddd !important;
    color: #000000 !important;
  }
}
