/* ═════════════════════════════════════════════════════════════════════
   EPD MVP 2025 - iOS 26 LIQUID GLASS DESIGN
   Hierarchy: Prominent = MEER transparantie (70-80%)
              Secondary = MINDER transparantie (40-50%)
   ═════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* iOS 26 Color Palette */
  --primary: #06b6d4;
  --primary-light: #67e8f9;
  --primary-dark: #0891b2;
  
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* iOS 26 Liquid Glass Hierarchy */
  --glass-prominent: rgba(255, 255, 255, 0.75); /* Hero cards, KPI's */
  --glass-secondary: rgba(255, 255, 255, 0.45); /* Content cards */
  --glass-tertiary: rgba(255, 255, 255, 0.25); /* Backgrounds */
  
  --glass-border-prominent: rgba(255, 255, 255, 0.9);
  --glass-border-secondary: rgba(148, 163, 184, 0.15);
  
  --glass-shadow-prominent: 0 12px 40px rgba(15, 23, 42, 0.12);
  --glass-shadow-secondary: 0 6px 20px rgba(15, 23, 42, 0.06);
  
  /* Blur levels (iOS 26 spec) */
  --blur-prominent: 30px;
  --blur-secondary: 20px;
  --blur-subtle: 10px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═════════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION (Prominent glass - hoogste hiërarchie)
   ═════════════════════════════════════════════════════════════════════ */

#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-prominent);
  backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  border-bottom: 1px solid var(--glass-border-prominent);
  padding: var(--spacing-md) var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--glass-shadow-prominent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

nav a {
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

nav a:hover {
  background: var(--glass-secondary);
  backdrop-filter: blur(var(--blur-secondary));
  -webkit-backdrop-filter: blur(var(--blur-secondary));
  color: var(--text-primary);
}

nav a.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

/* ═════════════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT
   ═════════════════════════════════════════════════════════════════════ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.page-header {
  margin-bottom: var(--spacing-xl);
}

.page-title {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═════════════════════════════════════════════════════════════════════
   GLASS CARDS HIERARCHY
   ═════════════════════════════════════════════════════════════════════ */

/* Prominent glass - KPI cards, hero sections */
.glass-card-prominent {
  background: var(--glass-prominent);
  backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  border: 1px solid var(--glass-border-prominent);
  border-radius: 20px;
  padding: var(--spacing-lg);
  box-shadow: var(--glass-shadow-prominent);
  transition: all var(--transition-base);
}

.glass-card-prominent:hover {
  box-shadow: 0 16px 56px rgba(15, 23, 42, 0.16);
  transform: translateY(-3px);
}

/* Secondary glass - content cards, standard items */
.glass-card {
  background: var(--glass-secondary);
  backdrop-filter: blur(var(--blur-secondary)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-secondary)) saturate(160%);
  border: 1px solid var(--glass-border-secondary);
  border-radius: 16px;
  padding: var(--spacing-lg);
  box-shadow: var(--glass-shadow-secondary);
  transition: all var(--transition-base);
}

.glass-card:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE GRID SYSTEM (Fixed - proper column wrapping)
   ═════════════════════════════════════════════════════════════════════ */

.row {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* 5-column grid voor KPI's */
.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* 3-column grid voor patiënten */
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 2-column grid voor content */
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 1-column grid */
.grid-1 {
  grid-template-columns: 1fr;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-5,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  nav {
    width: 100%;
    justify-content: center;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   KPI CARDS (Prominent glass)
   ═════════════════════════════════════════════════════════════════════ */

.kpi-card {
  text-align: center;
  padding: var(--spacing-xl);
}

.kpi-icon {
  font-size: 56px;
  margin-bottom: var(--spacing-md);
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.kpi-value {
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -1px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═════════════════════════════════════════════════════════════════════
   PATIENT CARDS
   ═════════════════════════════════════════════════════════════════════ */

.patient-card {
  cursor: pointer;
  transition: all var(--transition-base);
}

.patient-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.patient-info-header {
  flex: 1;
}

.patient-avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.patient-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.patient-id {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Courier New', monospace;
  font-weight: 600;
}

.patient-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--glass-border-secondary);
}

.patient-meta-item {
  display: flex;
  flex-direction: column;
}

.patient-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.patient-meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ═════════════════════════════════════════════════════════════════════
   CONSULTATIONS & APPOINTMENTS
   ═════════════════════════════════════════════════════════════════════ */

.consult-card {
  margin-bottom: var(--spacing-md);
}

.consult-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--glass-border-secondary);
}

.consult-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.consult-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.consult-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.consult-section {
  margin-bottom: var(--spacing-md);
}

.consult-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-sm);
}

.consult-section-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═════════════════════════════════════════════════════════════════════
   BUTTONS (iOS 26 style)
   ═════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(6, 182, 212, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--glass-secondary);
  backdrop-filter: blur(var(--blur-secondary));
  -webkit-backdrop-filter: blur(var(--blur-secondary));
  color: var(--text-primary);
  border: 1px solid var(--glass-border-secondary);
}

.btn-outline:hover {
  background: var(--glass-prominent);
  border-color: var(--glass-border-prominent);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ═════════════════════════════════════════════════════════════════════
   BADGES
   ═════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #065f46; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #92400e; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #991b1b; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #1e40af; }
.badge-gray { background: rgba(148, 163, 184, 0.15); color: #475569; }

/* Vervolg in DEEL 2... */
/* ═════════════════════════════════════════════════════════════════════
   TABLES
   ═════════════════════════════════════════════════════════════════════ */

.table-container {
  overflow-x: auto;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

thead {
  background: var(--glass-tertiary);
  backdrop-filter: blur(var(--blur-subtle));
  -webkit-backdrop-filter: blur(var(--blur-subtle));
}

th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--glass-border-secondary);
}

td {
  padding: 18px;
  border-bottom: 1px solid var(--glass-border-secondary);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--glass-tertiary);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ═════════════════════════════════════════════════════════════════════
   LOGIN PAGE (Prominent glass)
   ═════════════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(103, 232, 249, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 460px;
  padding: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--glass-prominent);
  backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  border: 1px solid var(--glass-border-prominent);
  border-radius: 28px;
  padding: var(--spacing-2xl);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.18);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.login-logo-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 44px;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.45);
}

.login-title {
  font-size: 30px;
  font-weight: 900;
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--glass-border-secondary);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
  background: white;
}

.login-demo {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--glass-tertiary);
  backdrop-filter: blur(var(--blur-subtle));
  -webkit-backdrop-filter: blur(var(--blur-subtle));
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.login-demo code {
  background: rgba(255, 255, 255, 0.8);
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Courier New', monospace;
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
}

/* ═════════════════════════════════════════════════════════════════════
   PATIENT DETAIL PAGE
   ═════════════════════════════════════════════════════════════════════ */

.detail-header {
  background: var(--glass-prominent);
  backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-prominent)) saturate(180%);
  border: 1px solid var(--glass-border-prominent);
  border-radius: 20px;
  padding: var(--spacing-2xl);
  margin-bottom: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-xl);
  box-shadow: var(--glass-shadow-prominent);
  align-items: center;
}

.detail-avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 40px;
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.35);
}

.detail-info {
  flex: 1;
}

.detail-info h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.5px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.detail-meta-item {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.detail-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ═════════════════════════════════════════════════════════════════════
   TABS
   ═════════════════════════════════════════════════════════════════════ */

.tabs {
  display: flex;
  gap: var(--spacing-xs);
  border-bottom: 2px solid var(--glass-border-secondary);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
}

.tab {
  padding: 14px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-primary);
  background: var(--glass-tertiary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ═════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═════════════════════════════════════════════════════════════════════ */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--spacing-xl);
  font-size: 14px;
  flex-wrap: wrap;
}

.breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-item {
  color: var(--text-muted);
  font-weight: 600;
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-weight: 400;
}

/* ═════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═════════════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) * 2;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 72px;
  margin-bottom: var(--spacing-lg);
  opacity: 0.4;
  filter: grayscale(1);
}

/* ═════════════════════════════════════════════════════════════════════
   UTILITIES
   ═════════════════════════════════════════════════════════════════════ */

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.clickable {
  cursor: pointer;
}

/* ═════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }
  
  #header {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }
  
  .detail-header {
    flex-direction: column;
    text-align: center;
    padding: var(--spacing-lg);
  }
  
  .detail-actions {
    justify-content: center;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .kpi-value {
    font-size: 44px;
  }
  
  .kpi-icon {
    font-size: 48px;
  }
}

/* ═════════════════════════════════════════════════════════════════════
   PERFORMANCE & ACCESSIBILITY
   ═════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Selection styling */
::selection {
  background: rgba(6, 182, 212, 0.25);
  color: var(--text-primary);
}
