/* ============================================================
   Lusaka Eye Hospital — Investigation & Diagnostics Module
   Clean, responsive styles matching LEH Portal Hub
   ============================================================ */

:root {
  --leh-blue: #2563eb;
  --leh-blue-dark: #1d4ed8;
  --leh-blue-light: #eff6ff;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--slate-50);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

#main-sidebar {
  width: 260px;
  background-color: #ffffff;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 260px;
  min-width: 0;
  min-height: 100vh;
}

@media (max-width: 1024px) {
  #main-sidebar {
    transform: translateX(-100%);
  }

  #main-sidebar.open {
    transform: translateX(0);
  }

  .content-wrapper {
    margin-left: 0;
  }
}

/* Nav Overlay */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 30;
}

#nav-overlay.open {
  display: block;
}

/* Top Header */
.top-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Sidebar Nav Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 2px 10px;
}

.nav-item:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.nav-item.active {
  background-color: var(--leh-blue-light);
  color: var(--leh-blue);
  font-weight: 700;
}

.nav-item i {
  font-size: 20px;
}

/* Main Content Area */
.main-content {
  padding: 24px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* View Section */
.view-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card-leh {
  background-color: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.card-leh:hover {
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07);
}

/* Table styling */
.leh-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.leh-table th {
  background-color: var(--slate-50);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
}

.leh-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

.leh-table tr:hover td {
  background-color: var(--slate-50);
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}
