:root {
  /* Color System */
  --primary: #0A5EB0;          /* Main blue - for navbar, buttons, links */
  --primary-dark: #003153;     /* Darker blue for hover states */
  --primary-light: #B9D9EB;    /* Lighter blue for backgrounds */
  
  /* Card header hierarchy colors */
  --card-header-primary: #F5F7FA;   /* Very light gray for primary card headers */
  --card-header-secondary: #F9FAFC; /* Even lighter gray for secondary headers */
  
  /* UN accent colors */
  --success: #018749;          /* UN Green */
  --info: #41B6E6;             /* Light blue */
  --warning: #FFD700;          /* UN Yellow */
  --danger: #E5243B;           /* UN Red */
  
  /* Neutral palette */
  --background: #FFFFFF;       /* Pure white background */
  --background-light: #F8FAFC; /* Very slight blue tint */
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  --white: #FFFFFF;

  /* Typography */
  --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-size-base: 1rem;      /* Base size: 16px */
  --font-size-sm: 0.875rem;    /* Small: 14px */
  --font-size-xs: 0.75rem;     /* Extra small: 12px */ 
  --font-size-lg: 1.125rem;    /* Large: 18px */
  --font-size-xl: 1.25rem;     /* Extra large: 20px */
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height: 1.5;
  
  /* Spacing system */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 1rem;     /* 16px */
  --space-4: 1.5rem;   /* 24px */
  --space-5: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  
  /* Borders */
  --border-width: 1px;
  --border-radius-sm: 0.25rem;  /* 4px */
  --border-radius: 0.375rem;    /* 6px */
  --border-radius-lg: 0.5rem;   /* 8px */
  --border-radius-xl: 1rem;     /* 16px */
  --border-color: var(--gray-300);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition: all 0.2s ease;
  
  /* Darken colors for hover states */
  --primary-darker: #084b8d;
  --success-darker: #016537;
  --info-darker: #2899c9;
  --danger-darker: #c91e32;
  --warning-darker: #e6c200;
  
  /* Login page specific colors */
  --login-bg: #f5f8fc;
  --login-box-shadow: rgba(10, 94, 176, 0.1);
  --login-text: var(--gray-800);
  --login-text-light: var(--gray-600);
}

/* Then keep all your other CSS rules as they are */

/* Add .text-capitalize as a regular rule where it belongs */
.text-capitalize {
  text-transform: capitalize !important;
}

/* Rest of your CSS file... */

/* Display utilities */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }

.flex-fill { flex: 1 1 auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }
.align-self-baseline { align-self: baseline !important; }
.align-self-stretch { align-self: stretch !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-5 { gap: var(--space-5) !important; }

/* Misc utilities */
.cursor-pointer { cursor: pointer !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-visible { overflow: visible !important; }

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Table Responsiveness */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ======= Responsive Design ======= */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
  .container {
    padding: var(--space-2);
  }
  
  .card-header {
    padding: var(--space-2) var(--space-3);
  }
  
  .card-body {
    padding: var(--space-2) var(--space-3);
  }
  
  .login-screen {
    padding: 1.5rem;
  }
  
  .navbar-brand .brand-primary {
    font-size: 1.1rem;
  }
  
  .navbar-brand .brand-secondary {
    font-size: 0.9rem;
  }
  
  .d-sm-none { display: none !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  
  /* Adjust tab effect for smaller screens */
  .card-header {
    margin-left: 0.25rem; /* Smaller tab on mobile */
  }
  
  .card-header:before {
    left: -0.25rem;
    width: 0.25rem;
  }

  .navbar-logo {
    height: 32px; /* Even smaller on mobile */
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .col-sm-1 { flex: 0 0 auto; width: 8.33333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.33333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
  
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }

  .navbar-logo {
    height: 36px; /* Smaller on tablets */
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .col-lg-1 { flex: 0 0 auto; width: 8.33333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
  
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .col-xl-1 { flex: 0 0 auto; width: 8.33333333%; }
  .col-xl-2 { flex: 0 0 auto; width: 16.66666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.33333333%; }
  .col-xl-5 { flex: 0 0 auto; width: 41.66666667%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-7 { flex: 0 0 auto; width: 58.33333333%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.66666667%; }
  .col-xl-9 { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.33333333%; }
  .col-xl-11 { flex: 0 0 auto; width: 91.66666667%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* Fix the card header tab styling */
.card-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gray-300);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  margin-left: 0 !important; /* Remove margin causing the cut appearance */
  z-index: 1;
}

/* Remove the problematic before pseudo-element */
.card-header:before {
  display: none !important; /* Disable completely */
}

/* Modern UI for CCA-CF Survey Application 
 A clean, minimalist design system */

/* ======= Base Elements ======= */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height);
  color: var(--gray-800);
  background-color: var(--background-light);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  color: var (--gray-900);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }
h6 { font-size: 0.8rem; }

p {
  margin-top: 0;
  margin-bottom: var(--space-3);
  line-height: var(--line-height);
}

/* ======= Layout Components ======= */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* ======= Navbar ======= */

.navbar {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: var(--white);
  margin-right: 1rem;
}

.navbar-brand .brand-primary {
  font-weight: var(--font-weight-bold);
  font-size: 1.4rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.navbar-brand .brand-secondary {
  font-weight: var(--font-weight-semibold);
  font-size: 1.2rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.navbar-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-item {
  margin-right: 1rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: var(--font-weight-medium);
}

/* UN Logo in navbar */
.navbar-logo-container {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-logo {
  height: 42px; /* Adjust to match your navbar height */
  width: auto;
  /* If the SVG is not already white */
  filter: brightness(0) invert(1); /* Makes any logo white */
}

/* Responsive logo sizing */
@media (max-width: 768px) {
  .navbar-logo {
    height: 36px; /* Smaller on tablets */
  }
}

@media (max-width: 576px) {
  .navbar-logo {
    height: 32px; /* Even smaller on mobile */
  }
}

/* ======= Cards ======= */

/* Remove hover effect from cards */
.card:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}

/* Basic card styles - simplified file tab style */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: visible; /* Allow for tab effect to show */
  transition: none;
  margin-bottom: 0.5rem;
}

/* Card headers styled as plain file tabs without background color */
.card-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gray-300);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  margin-left: 0 !important; /* Remove margin causing the cut appearance */
  z-index: 1;
}

/* Remove the problematic before pseudo-element */
.card-header:before {
  display: none !important; /* Disable completely */
}

/* Specific exceptions for Statistics, Country Documents, and Quick Links */
.statistics-card .card-header,
.card-header.bg-statistics {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.statistics-card .card-header h1,
.statistics-card .card-header h2,
.statistics-card .card-header h3,
.statistics-card .card-header h4,
.statistics-card .card-header h5,
.statistics-card .card-header h6,
.card-header.bg-statistics h1,
.card-header.bg-statistics h2,
.card-header.bg-statistics h3,
.card-header.bg-statistics h4,
.card-header.bg-statistics h5,
.card-header.bg-statistics h6 {
  color: var(--white) !important;
}

/* Country Documents styling */
.documents-card .card-header,
.card-header.bg-un-dark-blue {
  background-color: var(--primary-dark) !important;
  color: var(--white) !important;
}

.documents-card .card-header h1,
.documents-card .card-header h2,
.documents-card .card-header h3,
.documents-card .card-header h4,
.documents-card .card-header h5,
.documents-card .card-header h6,
.card-header.bg-un-dark-blue h1,
.card-header.bg-un-dark-blue h2,
.card-header.bg-un-dark-blue h3,
.card-header.bg-un-dark-blue h4,
.card-header.bg-un-dark-blue h5,
.card-header.bg-un-dark-blue h6 {
  color: var(--white) !important;
}

/* Quick Links styling */
.quicklinks-card .card-header,
.card-header.bg-un-light-blue {
  background-color: var(--primary-light) !important; 
  color: var(--gray-800) !important;
}

/* Tab navigation styling - similar to documents tab style */
.nav-tabs {
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 1rem;
}

.nav-tabs .nav-item {
  margin-bottom: -1px;
}

.nav-tabs .nav-link {
  color: var(--gray-700);
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-bottom: none;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
  padding: 0.4rem 1rem;
  margin-right: 0.25rem;
  font-weight: var(--font-weight-medium);
  transition: none;
}

.nav-tabs .nav-link:hover {
  color: var(--primary);
  border-color: var(--gray-200);
  background-color: var(--white);
}

.nav-tabs .nav-link.active {
  color: var(--gray-900);
  background-color: var(--white);
  border-bottom-color: var(--white);
  font-weight: var(--font-weight-semibold);
}

/* Card headers styled as file tabs */
.card-header h4 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.card-body {
  padding: 0.65rem;
  flex: 1 1 auto;
}

.card-footer {
  padding: var(--space-3);
  background-color: var(--card-header-primary);
  border-top: var(--border-width) solid var(--border-color);
}

/* Card header colors */
/* Default/primary tab is grey */
.card-header.bg-primary {
  background-color: var(--card-header-primary) !important;
  color: var(--gray-800) !important;
}

.card-header.bg-primary h1,
.card-header.bg-primary h2,
.card-header.bg-primary h3,
.card-header.bg-primary h4,
.card-header.bg-primary h5,
.card-header.bg-primary h6 {
  color: var(--gray-800) !important;
  margin-bottom: 0;
}

/* Special case overrides for dashboard components */
/* Blue tabs for elements with text-white class */
.card-header.bg-primary.text-white {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.card-header.bg-primary.text-white h1,
.card-header.bg-primary.text-white h2,
.card-header.bg-primary.text-white h3,
.card-header.bg-primary.text-white h4,
.card-header.bg-primary.text-white h5,
.card-header.bg-primary.text-white h6 {
  color: var(--white) !important;
  margin-bottom: 0;
}

/* Country cards in dashboard */
.card.border.bg-white .card-header.bg-primary {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.card.border.bg-white .card-header.bg-primary h6 {
  color: var(--white) !important;
}

/* Side panel stats card */
.card.shadow-sm .card-header.bg-primary {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.card.shadow-sm .card-header.bg-primary h1,
.card-shadow-sm .card-header.bg-primary h2,
.card-shadow-sm .card-header.bg-primary h3,
.card.shadow-sm .card-header.bg-primary h4,
.card-shadow-sm .card-header.bg-primary h5,
.card-shadow-sm .card-header.bg-primary h6 {
  color: var(--white) !important;
}

/* Other header color variants */
.card-header.bg-info {
  background-color: var(--info) !important;
  color: var(--white) !important;
}

.card-header.bg-success {
  background-color: var(--success) !important;
  color: var(--white) !important;
}

.card-header.bg-danger {
  background-color: var(--danger) !important;
  color: var(--white) !important;
}

.card-header.bg-warning {
  background-color: var(--warning) !important;
  color: var(--gray-900) !important;
}

.card-header.bg-light {
  background-color: var(--card-header-primary) !important;
  color: var(--gray-800) !important;
}

.card-header.bg-secondary {
  background-color: var(--gray-600) !important;
  color: var(--white) !important;
}

/* UN variant tabs */
.card-header.bg-un-blue {
  background-color: var(--card-header-primary) !important;
  color: var(--gray-800) !important;
}

.card-header.bg-un-blue h1,
.card-header.bg-un-blue h2,
.card-header.bg-un-blue h3,
.card-header.bg-un-blue h4,
.card-header.bg-un-blue h5,
.card-header.bg-un-blue h6 {
  color: var(--gray-800) !important;
}

.card-header.bg-un-dark-blue {
  background-color: var(--primary-dark) !important;
  color: var(--white) !important;
}

.card-header.bg-un-dark-blue h1,
.card-header.bg-un-dark-blue h2,
.card-header.bg-un-dark-blue h3,
.card-header.bg-un-dark-blue h4,
.card-header.bg-un-dark-blue h5,
.card-header.bg-un-dark-blue h6 {
  color: var(--white) !important;
}

.card-header.bg-un-light-blue {
  background-color: var(--primary-light) !important;
  color: var(--gray-800) !important;
}

/* Special cases for nested cards */
.card .card {
  margin-top: var(--space-3);
  border: 1px solid var(--gray-300);
}

/* Make cards with zero-padding body work with border radius */
.card-body.p-0 {
  padding: 0 !important;
}

/* Statistics card header - blue */
.statistics-card .card-header,
.card-header.bg-statistics {
  background-color: var(--primary) !important;
  color: var(--white) !important;
}

.statistics-card .card-header h1,
.statistics-card .card-header h2,
.statistics-card .card-header h3,
.statistics-card .card-header h4,
.statistics-card .card-header h5,
.statistics-card .card-header h6,
.card-header.bg-statistics h1,
.card-header.bg-statistics h2,
.card-header.bg-statistics h3,
.card-header.bg-statistics h4,
.card-header.bg-statistics h5,
.card-header.bg-statistics h6 {
  color: var(--white) !important;
}

/* Documents card header - dark blue */
.documents-card .card-header,
.card-header.bg-documents {
  background-color: var(--primary-dark) !important;
  color: var(--white) !important;
}

.documents-card .card-header h1,
.documents-card .card-header h2,
.documents-card .card-header h3,
.documents-card .card-header h4,
.documents-card .card-header h5,
.documents-card .card-header h6,
.card-header.bg-documents h1,
.card-header.bg-documents h2,
.card-header.bg-documents h3,
.card-header.bg-documents h4,
.card-header.bg-documents h5,
.card-header.bg-documents h6 {
  color: var(--white) !important;
}

/* Quick links card header - light blue */
.quicklinks-card .card-header,
.card-header.bg-quicklinks {
  background-color: var(--primary-light) !important;
  color: var(--gray-800) !important;
}

/* ======= Buttons ======= */

.btn {
  display: inline-block;
  font-weight: var(--font-weight-medium);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: var(--border-width) solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-base);
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(10, 94, 176, 0.25);
}

.btn-primary {
  color: var(--white);
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-darker);
  border-color: var(--primary-darker);
}

.btn-secondary {
  color: var(--white);
  background-color: var(--gray-600);
  border-color: var(--gray-600);
}

.btn-secondary:hover {
  background-color: var(--gray-700);
  border-color: var(--gray-700);
}

.btn-success {
  color: var(--white);
  background-color: var(--success);
  border-color: var(--success);
}

.btn-success:hover {
  background-color: var(--success-darker);
  border-color: var(--success-darker);
}

.btn-info {
  color: var(--white);
  background-color: var(--info);
  border-color: var (--info);
}

.btn-info:hover {
  background-color: var(--info-darker);
  border-color: var(--info-darker);
}

.btn-danger {
  color: var(--white);
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: var(--danger-darker);
  border-color: var(--danger-darker);
}

.btn-warning {
  color: var(--gray-900);
  background-color: var(--warning);
  border-color: var(--warning);
}

.btn-warning:hover {
  background-color: var(--warning-darker);
  border-color: var(--warning-darker);
}

.btn-light {
  color: var(--gray-900);
  background-color: var(--gray-200);
  border-color: var(--gray-200);
}

.btn-light:hover {
  background-color: var(--gray-300);
  border-color: var(--gray-300);
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: var(--border-radius-sm);
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.125rem;
  border-radius: var(--border-radius-lg);
}

.btn-outline-primary {
  color: var (--primary);
  border-color: var(--primary);
  background-color: transparent;
}

.btn-outline-primary:hover {
  color: var(--white);
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-secondary {
  color: var(--gray-600);
  border-color: var(--gray-600);
  background-color: transparent;
}

.btn-outline-secondary:hover {
  color: var(--white);
  background-color: var(--gray-600);
  border-color: var(--gray-600);
}

/* Dashboard style buttons */
.btn-sm.btn-outline-primary,
.btn-sm.btn-outline-secondary,
.btn-sm.btn-outline-danger,
.btn-sm.btn-outline-success,
.btn-sm.btn-outline-info {
  color: var(--gray-600);
  background-color: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  transition: var(--transition);
  border-radius: var(--border-radius-sm);
}

.btn-sm.btn-outline-primary:hover {
  color: var(--white);
  background-color: var(--primary);
}

.btn-sm.btn-outline-secondary:hover {
  color: var(--white);
  background-color: var(--gray-600);
}

.btn-sm.btn-outline-danger:hover {
  color: var(--white);
  background-color: var(--danger);
}

.btn-sm.btn-outline-success:hover {
  color: var(--white);
  background-color: var(--success);
}

.btn-sm.btn-outline-info:hover {
  color: var(--white);
  background-color: var(--info);
}

/* Survey action buttons */
.survey-actions .btn-sm,
.flex-grow-1 .btn-sm,
.mt-3 .btn-sm {
  color: var(--gray-600);
  background-color: transparent;
  border: none;
  transition: var(--transition);
}

.survey-actions .btn-sm:hover,
.flex-grow-1 .btn-sm.btn-outline-primary:hover,
.mt-3 .btn-sm.btn-outline-primary:hover {
  color: var(--white);
  background-color: var(--primary);
}

.survey-actions .btn-sm.btn-outline-secondary:hover,
.mt-3 .btn-sm.btn-outline-secondary:hover {
  color: var(--white);
  background-color: var(--gray-600);
}

.survey-actions .btn-sm.btn-outline-danger:hover,
.mt-3 .btn-sm.btn-outline-danger:hover {
  color: var(--white);
  background-color: var(--danger);
}

/* ======= Badges ======= */

.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 0.75em;
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.badge.bg-primary {
  background-color: var(--primary);
  color: var(--white);
}

.badge.bg-secondary {
  background-color: var(--gray-600);
  color: var(--white);
}

.badge.bg-success {
  background-color: var(--success);
  color: var(--white);
}

.badge.bg-info {
  background-color: var(--info);
  color: var(--white);
}

.badge.bg-warning {
  background-color: var(--warning);
  color: var(--gray-900);
}

.badge.bg-danger {
  background-color: var(--danger);
  color: var(--white);
}

.badge.bg-light {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

.badge.rounded-pill {
  border-radius: 50rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.badge.bg-soft-primary {
  background-color: rgba(10, 94, 176, 0.1);
  color: var(--primary);
}

.badge.text-primary {
  color: var(--primary) !important;
}

/* Card header badges */
.card-header .badge {
  margin-left: 0.5rem;
}

/* ======= Info Box ======= */

.info-box {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  transition: transform 0.2s ease;
  border: 1px solid var(--gray-200);
}

.info-box:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.info-box-heading {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2);
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: var(--space-2);
}

.info-box-heading i {
  margin-right: 0.5rem;
}

/* ======= Lists ======= */

.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: var(--border-radius);
}

.list-group-item {
  position: relative;
  display: block;
  padding: var(--space-3);
  background-color: var(--white);
  border: var(--border-width) solid var(--border-color);
}

.list-group-item:first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.list-group-item:last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.list-group-item-action {
  width: 100%;
  color: var(--gray-800);
  text-align: inherit;
  text-decoration: none;
}

.list-group-item-action:hover, .list-group-item-action:focus {
  color: var(--gray-900);
  text-decoration: none;
  background-color: var(--gray-100);
}

.card-body .list-group-item {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* ======= Forms ======= */

.form-label {
  margin-bottom: 0.5rem;
  font-weight: var(--font-weight-medium);
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--white);
  background-clip: padding-box;
  border: var(--border-width) solid var(--gray-400);
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: var(--gray-900);
  background-color: var(--white);
  border-color: var(--primary-light);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(10, 94, 176, 0.25);
}

.form-text {
  margin-top: 0.25rem;
  font-size: var(--font-size-sm);
  color: var(--gray-600);
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: var(--border-width) solid var(--gray-400);
  border-radius: var(--border-radius);
  appearance: none;
}

/* ======= Tables ======= */

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--gray-900);
  vertical-align: top;
  border-color: var(--gray-300);
}

.table > :not(caption) > * > * {
  padding: 0.5rem;
  border-bottom-width: 1px;
  box-shadow: inset 0 0 0 9999px transparent;
}

.table > thead {
  vertical-align: bottom;
}

.table > tbody {
  vertical-align: inherit;
}

.table-hover > tbody > tr:hover {
  background-color: var(--gray-100);
}

/* ======= Progress Bars ======= */

.progress {
  display: flex;
  height: 6px;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: var(--gray-200);
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  white-space: nowrap;
  background-color: var(--primary);
  transition: width 0.6s ease;
}

.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

/* ======= Alert Messages ======= */

.alert {
  position: relative;
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.15rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
}

.alert-dismissible {
  padding-right: 3rem;
}

.alert-dismissible .btn-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 0.1rem 0.25rem;
  font-size: 0.7rem;
}

.alert-primary {
  color: var(--primary-darker);
  background-color: #e6effa;
  border-color: #cce3f6;
}

.alert-secondary {
  color: #41464b;
  background-color: #e2e3e5;
  border-color: #d3d6d8;
}

.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
}

.alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

/* ======= Login Components ======= */

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  margin: 0;
  padding: 0;
  background-color: var(--login-bg);
}

.login-screen {
  background: var(--white);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  gap: 1.5rem;
  position: relative;
}

.login-logo {
  margin-bottom: 1rem;
  text-align: center;
}

.login-logo h3 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.login-logo p {
  color: var(--login-text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.login-field {
  background: var(--white);
  box-shadow: 0 0 1rem var(--login-box-shadow);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.login-field label {
  position: absolute;
  top: 0.7rem;
  left: 1.5rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.login-field input {
  width: 100%;
  outline: none;
  border: none;
  margin-top: 1.2rem;
  font-size: 1rem;
  color: var (--login-text);
  padding: 0;
}

.login-field input::placeholder {
  color: var(--login-text-light);
  opacity: 0.6;
}

.login-field i {
  color: var(--primary);
  margin-right: 0.8rem;
  font-size: 1.2rem;
  margin-top: 1rem;
}

/* Password field with toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute !important;
  right: 1.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  cursor: pointer !important;
  color: var(--gray-500) !important;
  transition: var(--transition) !important;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--primary) !important;
}

/* Adjust password input padding to make room for toggle */
.password-field input {
  padding-right: 3rem !important;
}

.login-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.login-btn {
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

.login-btn:hover {
  background: var(--primary-darker);
}

.login-footer {
  display: flex;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--login-text-light);
  margin-top: 1rem;
  text-align: center;
}

.login-footer span {
  cursor: pointer;
  color: var(--primary);
}

/* ======= Country Components ======= */

.country-badges {
  display: block;
  text-align: left;
  width: 100%;
  padding: var(--space-2) 0;
}

.country-badges .badge {
  display: inline-block !important;
  width: auto !important;
  max-width: max-content !important;
  margin-right: var(--space-1) !important;
  margin-bottom: var(--space-1) !important;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
}

.country-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

/* ======= Survey Dashboard Components ======= */

.survey-progress {
  margin-bottom: var(--space-3);
}

.survey-progress .progress {
  height: 8px;
  margin-bottom: var (--space-1);
}

.survey-progress .progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-600);
}

.survey-card {
  margin-bottom: var(--space-3);
  transition: var(--transition);
}

.survey-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.survey-card .card-header {
  padding: var(--space-2) var(--space-3);
}

.survey-actions {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.survey-status {
  font-size: 0.75rem;
  font-weight: var(--font-weight-medium);
}

/* ======= Modal Components ======= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055 !important; /* Increase modal z-index */
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 500px;
  z-index: 1056 !important; /* Higher than the modal container */
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--white);
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  outline: 0;
  z-index: 1057 !important; /* Higher than the dialog */
}

.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: calc(var(--border-radius-lg) - 1px);
  border-top-right-radius: calc(var(--border-radius-lg) - 1px);
}

.modal-header.bg-danger {
  background-color: var(--danger);
  color: var(--white);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  border-bottom-right-radius: calc(var(--border-radius-lg) - 1px);
  border-bottom-left-radius: calc(var(--border-radius-lg) - 1px);
}

.modal-backdrop {
  z-index: 1054 !important; /* Keep backdrop just below modal */
}

/* ======= Footer ======= */

.footer {
  background-color: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  color: var(--gray-700);
  padding: var(--space-4) 0;
  margin-top: auto;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ======= Custom Flash Messages ======= */

.flash-message-container {
  padding: 0.1rem 0;
  margin-bottom: 0.15rem;
}

/* ======= Additional Utility Classes ======= */

/* Text utilities */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--gray-600) !important; }
.text-success { color: var(--success) !important; }
.text-info { color: var(--info) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-light { color: var(--gray-200) !important; }
.text-dark { color: var(--gray-900) !important; }
.text-muted { color: var(--gray-600) !important; }
.text-white { color: var(--white) !important; }

/* Background utilities */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--gray-600) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-light { background-color: var(--gray-100) !important; }
.bg-dark { background-color: var(--gray-900) !important; }
.bg-white { background-color: var(--white) !important; }

/* Border utilities */
.border { border: var(--border-width) solid var(--border-color) !important; }
.border-top { border-top: var(--border-width) solid var(--border-color) !important; }
.border-end { border-right: var(--border-width) solid var(--border-color) !important; }
.border-bottom { border-bottom: var(--border-width) solid var(--border-color) !important; }
.border-start { border-left: var(--border-width) solid var(--border-color) !important; }

.border-0 { border: 0 !important; }
.border-top-0 { border-top: 0 !important; }
.border-end-0 { border-right: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-start-0 { border-left: 0 !important; }

/* Border radius utilities */
.rounded { border-radius: var(--border-radius) !important; }
.rounded-top { border-top-left-radius: var(--border-radius) !important; border-top-right-radius: var(--border-radius) !important; }
.rounded-end { border-top-right-radius: var(--border-radius) !important; border-bottom-right-radius: var(--border-radius) !important; }
.rounded-bottom { border-bottom-right-radius: var(--border-radius) !important; border-bottom-left-radius: var(--border-radius) !important; }
.rounded-start { border-top-left-radius: var(--border-radius) !important; border-bottom-left-radius: var(--border-radius) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-0 { border-radius: 0 !important; }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-none { box-shadow: none !important; }

/* Margin utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-5 { margin: var(--space-5) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: var(--space-1) !important; }
.me-2 { margin-right: var(--space-2) !important; }
.me-3 { margin-right: var(--space-3) !important; }
.me-4 { margin-right: var(--space-4) !important; }
.me-5 { margin-right: var(--space-5) !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: var(--space-1) !important; }
.ms-2 { margin-left: var(--space-2) !important; }
.ms-3 { margin-left: var(--space-3) !important; }
.ms-4 { margin-left: var(--space-4) !important; }
.ms-5 { margin-left: var(--space-5) !important; }

.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }

/* Padding utilities */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--space-1) !important; }
.pt-2 { padding-top: var(--space-2) !important; }
.pt-3 { padding-top: var(--space-3) !important; }
.pt-4 { padding-top: var(--space-4) !important; }
.pt-5 { padding-top: var(--space-5) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--space-1) !important; }
.pb-2 { padding-bottom: var(--space-2) !important; }
.pb-3 { padding-bottom: var(--space-3) !important; }
.pb-4 { padding-bottom: var(--space-4) !important; }
.pb-5 { padding-bottom: var(--space-5) !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: var(--space-1) !important; padding-bottom: var(--space-1) !important; }
.py-2 { padding-top: var(--space-2) !important; padding-bottom: var(--space-2) !important; }
.py-3 { padding-top: var(--space-3) !important; padding-bottom: var(--space-3) !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: var(--space-1) !important; padding-right: var(--space-1) !important; }
.px-2 { padding-left: var(--space-2) !important; padding-right: var(--space-2) !important; }
.px-3 { padding-left: var(--space-3) !important; padding-right: var(--space-3) !important; }

/* Text formatting utilities */
.fw-normal { font-weight: var(--font-weight-normal) !important; }
.fw-medium { font-weight: var(--font-weight-medium) !important; }
.fw-semibold { font-weight: var(--font-weight-semibold) !important; }
.fw-bold { font-weight: var(--font-weight-bold) !important; }

.fs-sm { font-size: var(--font-size-sm) !important; }
.fs-base { font-size: var(--font-size-base) !important; }
.fs-lg { font-size: var(--font-size-lg) !important; }
.fs-xl { font-size: var(--font-size-xl) !important; }

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-decoration-none {
  text-decoration: none !important;
}

.text-decoration-underline {
  text-decoration: underline !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-lowercase {
  text-transform: lowercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

/* Add this to your style.css file */

/* Reduce space between navbar and content */
.content-wrapper .container {
  margin-top: 0.75rem !important; /* Override the mt-4 from base.html */
}

/* Make flash message container more compact */
.flash-message-container {
  min-height: 0;
  padding: 0.15rem 0;
  margin-bottom: 0;
}

/* Adjust alert padding for flash messages */
.alert {
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

/* Additional spacing reductions for dashboard */
.container.mt-2 {
  margin-top: 0.15rem !important; /* Override bootstrap's mt-2 */
}

/* Ultra compact flash messages */
.flash-message-container {
  min-height: 0;
  padding: 0.1rem 0;
  margin-bottom: 0.15rem;
}

.alert {
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.15rem;
}

.alert .btn-close {
  padding: 0.1rem 0.25rem;
  font-size: 0.7rem;
}

/* Remove extra space at top of cards */
.card {
  margin-bottom: 0.5rem;
}

.card-body {
  padding: 0.65rem;
}

/* Make dashboard elements more compact vertically */
.badge {
  padding: 0.25em 0.5em;
}

/* Match Active Review Rounds styling with other cards */
.card-header.bg-un-blue {
  background-color: var(--card-header-primary) !important;
  color: var(--gray-800) !important;
}

.card-header.bg-un-blue h1,
.card-header.bg-un-blue h2,
.card-header.bg-un-blue h3,
.card-header.bg-un-blue h4,
.card-header.bg-un-blue h5,
.card-header.bg-un-blue h6 {
  color: var(--gray-800) !important;
}

/* Add these styles at the end of your CSS file */

/* Enhanced Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Allow clicking to dismiss */
}

/* Ensure overlay blocks ALL form interactions when active */
.loading-overlay.active ~ * form,
.loading-overlay.active ~ * button[type="submit"],
.loading-overlay.active ~ * .btn-primary,
.loading-overlay.active ~ * .btn-success {
  pointer-events: none !important;
}

/* Loading content should not be dismissible by clicking */
.loading-overlay-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  width: 80%;
  pointer-events: none; /* Prevent dismissal by clicking content */
}

/* Enhanced button disabled state */
button[data-processing="true"],
button[disabled] {
  opacity: 0.6 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Visual feedback for processing state */
button[data-processing="true"]::after {
  content: " (Saving...)";
  font-size: 0.8em;
  opacity: 0.8;
}