/* ========================================
   RiskWell Modern Design System
   ======================================== */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@200..800&family=Poppins:wght@600;700&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* CSS Variables for consistent theming */
:root {
  /* Primary colors - Professional blue palette */
/*  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  */
  /* Alternative color options - uncomment one to use:
  
  /* Option 1: Deep Purple (sophisticated, trustworthy) */
  /* --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); */
  
  /* Option 2: Forest Green (health, growth) */
  /* --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #10b981;
  --primary-gradient: linear-gradient(135deg, #059669 0%, #047857 100%); */
  
  /* Option 3: Slate Blue (professional, stable) */
   --primary: #475569;
  --primary-dark: #334155;
  --primary-light: #64748b;
  --primary-gradient: linear-gradient(135deg, #475569 0%, #334155 100%); 
  
  /* Option 4: Indigo (trust, depth) */
/*   --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); 
  */
  /* Secondary colors - Purple accent */
  --secondary: #8b5cf6;
  --secondary-dark: #7c3aed;
  --secondary-light: #a78bfa;
  
  /* Success, warning, danger, info */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Neutral colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  /* Text colors */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Border and shadows */
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Base styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 0.75em;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Layout */
.container-fluid {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

/* Constrained container for main content */
main .container-fluid {
  max-width: 1400px;
  margin: 0 auto;
}

/* Navigation styling */
.navbar {
  background: var(--bg-primary) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  z-index: 1030;
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.navbar-brand:hover {
  color: var(--primary-dark) !important;
}

.navbar-brand i {
  font-size: 1.25rem;
}

.navbar-nav {
  gap: 0.25rem;
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  margin: 0;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
  font-size: 0.875rem;
  white-space: nowrap;
}

.navbar-nav .nav-link i {
  font-size: 0.875rem;
  margin-right: 0.375rem;
}

.navbar-nav .nav-link:hover {
  color: var(--primary) !important;
  background-color: var(--gray-50);
}

.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background-color: rgba(6, 182, 212, 0.1);
}

/* Navbar container adjustments */
.navbar .container-fluid {
  max-width: 100%;
  padding: 0 1rem;
}

/* Prevent navbar overflow */
.navbar-nav {
  flex-wrap: nowrap;
}

/* Ensure dropdowns work properly */
.navbar .dropdown {
  position: relative;
}

.navbar .dropdown-menu.show {
  display: block;
}

/* Login partial in navbar */
.navbar .navbar-nav:last-child {
  margin-left: auto;
}

/* Responsive navbar */
@media (max-width: 1399px) {
  .navbar-nav .nav-link {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.8125rem;
  }
  
  .navbar-brand {
    font-size: 1.125rem;
  }
  
  @media (max-width: 576px) {
    .navbar-nav .nav-link {
      padding: 0.5rem 0.75rem !important;
      font-size: 0.875rem;
    }

    .navbar-nav .nav-link i {
      font-size: 0.875rem;
    }
  }
}

@media (max-width: 1199px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1040;
  }

  .navbar-collapse.collapsing,
  .navbar-collapse.collapse:not(.show) {
    display: none;
  }

  .navbar-collapse.collapse.show {
    display: block;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    font-size: 0.9375rem;
  }

  /* Ensure login partial aligns properly in collapsed menu */
  .navbar-collapse .navbar-nav:last-child {
    margin-left: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }
}

/* Dropdown menus */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin-top: 0.5rem;
  min-width: 200px;
  position: absolute !important;
  z-index: 1050;
}

/* Dropdown positioning fix */
@media (min-width: 1200px) {
  .navbar-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.125rem;
  }
  
  /* Adjust dropdown position if it goes off screen */
  .navbar-nav .dropdown:last-child .dropdown-menu,
  .navbar-nav .dropdown:nth-last-child(2) .dropdown-menu {
    left: auto;
    right: 0;
  }
}

/* Full width dropdowns on mobile */
@media (max-width: 1199px) {
  .navbar .dropdown-menu {
    position: relative !important;
    width: 100%;
    margin-top: 0.25rem;
    margin-left: 1rem;
    box-shadow: none;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
  }
}

.dropdown-item {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.dropdown-item:hover {
  background-color: var(--gray-100);
  color: var(--primary);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--primary);
  color: white;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-md);
  font-weight: 600;
  color: var(--gray-900);
}

.card-body {
  padding: var(--spacing-md);
}

/* Buttons */
.btn {
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: 0.025em;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #065f7b 100%);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
  border: none;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  color: white;
}

.btn-success {
  background-color: var(--success);
  color: white;
  border: none;
}

.btn-success:hover {
  background-color: #059669;
  color: white;
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  border: none;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: white;
}

.btn-outline-primary {
  color: var(--primary);
  border: 2px solid var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-link {
  color: var(--primary);
  text-decoration: none;
  padding: 0.5rem;
}

.btn-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Forms */
.form-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  background-color: var(--bg-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.input-group-text {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Tables */
.table {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background-color: var(--bg-tertiary);
  color: var(--gray-700);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table tbody td {
  padding: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
  background-color: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--bg-secondary);
}

/* Badges */
.badge {
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--primary-dark);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* Fix text-white cascade issue - ensure child elements inherit white color */
.bg-danger.text-white h1,
.bg-danger.text-white h2,
.bg-danger.text-white h3,
.bg-danger.text-white h4,
.bg-danger.text-white h5,
.bg-danger.text-white h6,
.bg-danger.text-white p,
.bg-danger.text-white i,
.bg-danger.text-white .fas,
.bg-danger.text-white .far,
.bg-danger.text-white strong,
.bg-danger.text-white dt,
.bg-danger.text-white dd,
.bg-danger.text-white span:not(.badge),
.bg-danger.text-white a:not(.btn) {
  color: white !important;
}

.bg-warning.text-white h1,
.bg-warning.text-white h2,
.bg-warning.text-white h3,
.bg-warning.text-white h4,
.bg-warning.text-white h5,
.bg-warning.text-white h6,
.bg-warning.text-white p,
.bg-warning.text-white i,
.bg-warning.text-white .fas,
.bg-warning.text-white .far,
.bg-warning.text-white strong,
.bg-warning.text-white dt,
.bg-warning.text-white dd,
.bg-warning.text-white span:not(.badge),
.bg-warning.text-white a:not(.btn) {
  color: white !important;
}

.bg-info.text-white h1,
.bg-info.text-white h2,
.bg-info.text-white h3,
.bg-info.text-white h4,
.bg-info.text-white h5,
.bg-info.text-white h6,
.bg-info.text-white p,
.bg-info.text-white i,
.bg-info.text-white .fas,
.bg-info.text-white .far,
.bg-info.text-white strong,
.bg-info.text-white dt,
.bg-info.text-white dd,
.bg-info.text-white span:not(.badge),
.bg-info.text-white a:not(.btn) {
  color: white !important;
}

.bg-success.text-white h1,
.bg-success.text-white h2,
.bg-success.text-white h3,
.bg-success.text-white h4,
.bg-success.text-white h5,
.bg-success.text-white h6,
.bg-success.text-white p,
.bg-success.text-white i,
.bg-success.text-white .fas,
.bg-success.text-white .far,
.bg-success.text-white strong,
.bg-success.text-white dt,
.bg-success.text-white dd,
.bg-success.text-white span:not(.badge),
.bg-success.text-white a:not(.btn) {
  color: white !important;
}

.bg-primary.text-white h1,
.bg-primary.text-white h2,
.bg-primary.text-white h3,
.bg-primary.text-white h4,
.bg-primary.text-white h5,
.bg-primary.text-white h6,
.bg-primary.text-white p,
.bg-primary.text-white i,
.bg-primary.text-white .fas,
.bg-primary.text-white .far,
.bg-primary.text-white strong,
.bg-primary.text-white dt,
.bg-primary.text-white dd,
.bg-primary.text-white span:not(.badge),
.bg-primary.text-white a:not(.btn) {
  color: white !important;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #92400e;
  border-left: 4px solid var(--warning);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #1e3a8a;
  border-left: 4px solid var(--info);
}

/* Progress bars */
.progress {
  height: 0.75rem;
  background-color: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow) ease;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 1rem 1.5rem;
}

/* Pagination */
.pagination {
  gap: 0.25rem;
}

.page-link {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.page-link:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--primary);
}

.page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Breadcrumbs */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-muted);
  font-weight: 600;
}

/* Dashboard widgets */
.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-card .stat-change {
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* Charts container */
.chart-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* List groups */
.list-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.list-group-item {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  background-color: var(--bg-primary);
  transition: all var(--transition-fast);
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background-color: var(--gray-50);
}

/* Footer */
.footer {
  background-color: var(--gray-900);
  color: var(--gray-400);
  padding: 2rem 0;
  margin-top: 4rem;
  position: relative;
  width: 100%;
}

.footer a {
  color: var(--gray-300);
}

.footer a:hover {
  color: white;
}

/* Loading spinner */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.25rem;
  border-color: var(--primary);
  border-right-color: transparent;
}

/* Utility classes */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary-light { background-color: rgba(6, 182, 212, 0.1) !important; }
.bg-secondary-light { background-color: rgba(139, 92, 246, 0.1) !important; }
.bg-success-light { background-color: rgba(16, 185, 129, 0.1) !important; }
.bg-danger-light { background-color: rgba(239, 68, 68, 0.1) !important; }
.bg-warning-light { background-color: rgba(245, 158, 11, 0.1) !important; }
.bg-info-light { background-color: rgba(59, 130, 246, 0.1) !important; }

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container-fluid {
    padding: 0 1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .page-link {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
}

/* Custom utility classes */
.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-hover {
  transition: box-shadow var(--transition-base);
}

.shadow-hover:hover {
  box-shadow: var(--shadow-lg);
}

/* Icon adjustments */
.far, .fab {
  margin-right: 0.5rem;
}

/* Override Bootstrap defaults */
.border-0 { border: none !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

/* Landing Page Specific Styles */
.min-vh-75 {
  min-height: 75vh;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
}

.hero-gradient-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
}

.floating-card {
  position: absolute;
  background: var(--bg-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  animation: float 6s ease-in-out infinite;
}

.floating-card i {
  font-size: 1.5rem;
}

.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 50%;
  right: 10%;
  animation-delay: 2s;
}

.card-3 {
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Mini Stats */
.stat-mini {
  text-align: center;
  padding: 1rem;
}

.stat-mini .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-mini .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Features Section */
.features-section {
  background-color: var(--bg-primary);
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  height: 100%;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-card:hover::before {
  transform: translateX(0);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.75rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-list i {
  font-size: 0.875rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 5rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.cta-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

.cta-section .btn {
  background: white;
  color: var(--primary);
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.cta-section .btn:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

/* Public Layout Adjustments */
._PublicLayout .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
}

/* Responsive Hero */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-visual {
    margin-top: 3rem;
    height: 300px;
  }
  
  .floating-card {
    position: static;
    margin: 1rem 0;
    animation: none;
  }
  
  .hero-gradient-bg {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .stat-mini .stat-value {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .feature-card {
    margin-bottom: 1rem;
  }
}

/* ========================================
   Login Page Styles
   ======================================== */

.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* Left Brand Panel */
.login-brand-panel {
  background: var(--primary-gradient);
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.login-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 500px;
  width: 100%;
}

.login-features {
  margin-top: 3rem;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  color: white;
}

.login-feature-item i {
  font-size: 1.5rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

.login-feature-item h5 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.login-feature-item p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.875rem;
}

.login-stats .stat-mini {
  text-align: center;
}

.login-stats .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: white !important;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Remove gradient text for login stats */
  -webkit-text-fill-color: white !important;
  background: none !important;
}

.login-stats .stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Right Form Panel */
.login-form-panel {
  background-color: var(--bg-secondary);
  padding: 2rem;
}

.login-form-container {
  max-width: 400px;
  width: 100%;
}

.login-form {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.login-form .form-control-lg {
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.login-form .input-group-text {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-muted);
}

.login-form .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.login-form .alert {
  margin-bottom: 1.5rem;
}

.login-form .validation-summary-errors ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.login-form .validation-summary-errors li {
  font-size: 0.875rem;
}

.login-footer {
  margin-top: 2rem;
}

/* Login page specific body styling */
body:has(.login-container) {
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Responsive Login */
@media (max-width: 991px) {
  .login-container {
    position: relative;
    min-height: 100vh;
  }
  
  .login-form-panel {
    min-height: 100vh;
    padding: 1rem;
  }
  
  .login-form {
    padding: 1.5rem;
  }
}

/* ========================================
   Dashboard Styles
   ======================================== */

.dashboard-container {
  padding: 2rem 0;
}

.dashboard-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 2rem;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.dashboard-date {
  background: var(--bg-tertiary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Metric Cards */
.metric-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  z-index: 0;
}

.gradient-primary::before {
  background: var(--primary-gradient);
}

.gradient-success::before {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.gradient-warning::before {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.gradient-info::before {
  background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
}

.metric-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.metric-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon i {
  font-size: 1.75rem;
  color: var(--gray-700);
}

.metric-details {
  flex: 1;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-trend {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metric-trend.positive {
  color: var(--success);
}

.metric-trend i {
  font-size: 0.75rem;
}

/* Chart Cards */
.chart-card {
  height: 100%;
}

.chart-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.chart-container-small {
  position: relative;
  height: 250px;
}

/* Alerts */
.alerts-container {
  max-height: 400px;
  overflow-y: auto;
}

.alert-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

.alert-item:last-child {
  border-bottom: none;
}

.alert-item:hover {
  background-color: var(--bg-secondary);
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.alert-severity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-type {
  font-weight: 600;
  color: var(--gray-900);
}

.alert-time {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.alert-content {
  margin-bottom: 0.75rem;
}

.alert-member {
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.alert-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
}

/* Risk Members */
.risk-members-container {
  max-height: 400px;
  overflow-y: auto;
}

.risk-score-container {
  min-width: 150px;
}

.risk-score-container .progress {
  height: 0.75rem;
  margin-bottom: 0.5rem;
}

.risk-score-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.risk-score-value {
  font-weight: 600;
  color: var(--gray-900);
}

.risk-tier {
  color: var(--text-muted);
}

/* Enrollment Progress */
.enrollment-progress {
  min-width: 120px;
}

.enrollment-progress .progress {
  height: 0.75rem;
  margin-bottom: 0.25rem;
}

.enrollment-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Quick Actions */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
  height: 100%;
}

.quick-action-card:hover {
  background: var(--bg-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.quick-action-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.quick-action-icon i {
  font-size: 2rem;
}

.quick-action-text {
  font-weight: 600;
  color: var(--gray-800);
  text-align: center;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
  .metric-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-title {
    font-size: 2rem;
  }
  
  .dashboard-date {
    margin-top: 1rem;
    display: inline-block;
  }
  
  .metric-content {
    flex-direction: column;
    text-align: center;
  }
  
  .metric-value {
    font-size: 1.75rem;
  }
  
  .quick-action-card {
    padding: 1.5rem 1rem;
  }
  
  .quick-action-icon {
    width: 60px;
    height: 60px;
  }
  
  .quick-action-icon i {
    font-size: 1.5rem;
  }
}