/**
 * African Urban Agenda Platform
 * UN-Habitat inspired theme - Complete Styles
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  /* African Color Palette */
  --un-blue: #00537A;
  --un-blue-dark: #003d5c;
  --un-blue-light: #C7AF94;
  --un-navy: #5F6F52;
  --un-teal: #9D4112;
  --un-green: #A9B380;
  --accent-orange: #D85512;
  --accent-gold: #FC9500;
  --accent-red: #C4661F;
  --neutral-dark: #1d1d1b;
  --neutral-gray: #5c5c5c;
  --neutral-light: #f8f5f0;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

/* ============================================
   Base Styles
   ============================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--neutral-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: var(--un-blue-dark);
  line-height: 1.3;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   SDG Banner
   ============================================ */
.sdg-banner {
  display: flex;
  height: 6px;
  width: 100%;
}

.sdg-banner span {
  flex: 1;
}

.sdg-1 { background-color: #e5243b; }
.sdg-2 { background-color: #dda63a; }
.sdg-3 { background-color: #4c9f38; }
.sdg-4 { background-color: #c5192d; }
.sdg-5 { background-color: #ff3a21; }
.sdg-6 { background-color: #26bde2; }
.sdg-7 { background-color: #fcc30b; }
.sdg-8 { background-color: #a21942; }
.sdg-9 { background-color: #fd6925; }
.sdg-10 { background-color: #dd1367; }
.sdg-11 { background-color: #fd9d24; }
.sdg-12 { background-color: #bf8b2e; }
.sdg-13 { background-color: #3f7e44; }
.sdg-14 { background-color: #0a97d9; }
.sdg-15 { background-color: #56c02b; }
.sdg-16 { background-color: #00689d; }
.sdg-17 { background-color: #19486a; }

/* ============================================
   Header — AP-UAP style (2-bar)
   ============================================ */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

/* Top blue bar */
.header-topbar {
  background: linear-gradient(90deg, #1a3a5c 0%, #009edb 100%);
  padding: 0;
}

.topbar-brand {
  gap: 12px;
}

.topbar-logo {
  height: 160px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.05) drop-shadow(0 1px 6px rgba(0,0,0,0.35));
}

/* NUA / SDG logos in navbar */
.navbar-nua-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.topbar-lang-toggle {
  color: rgba(255,255,255,0.9) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  transition: all 0.2s;
}

.topbar-lang-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

/* White nav bar */
.header-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
}

.header-navbar .navbar {
  padding: 0;
}

.auap-nav .nav-link {
  color: #2c3e50 !important;
  font-size: 17px;
  font-weight: 600;
  padding: 18px 14px !important;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  transition: all 0.2s;
  white-space: nowrap;
}

.auap-nav .nav-link:hover,
.auap-nav .nav-link.active {
  color: #009edb !important;
  border-bottom-color: #009edb;
  background: transparent;
}

.auap-nav .dropdown-menu {
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 6px;
  padding: 8px 0;
  margin-top: 0;
}

.auap-nav .dropdown-item {
  font-size: 14.5px;
  padding: 9px 20px;
  color: #2c3e50;
}

.auap-nav .dropdown-item:hover {
  background: #f0f8ff;
  color: #009edb;
}

.btn-contact-us {
  background: #009edb;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 4px;
  border: none;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-contact-us:hover {
  background: #0076a8;
  color: #fff !important;
}

/* Mobile adjustments */
@media (max-width: 991px) {
  .header-navbar .navbar-collapse {
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 8px 0 16px;
  }

  .auap-nav .nav-link {
    padding: 10px 20px !important;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .auap-nav .nav-link:hover,
  .auap-nav .nav-link.active {
    border-bottom: none;
    border-left-color: #009edb;
    background: #f0f8ff;
  }

  .auap-nav-actions {
    padding: 8px 20px 0;
  }
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider {
  position: relative;
  height: 580px;
}

.hero-slider .carousel-inner,
.hero-slider .carousel-item {
  height: 580px;
}

.slider-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 8s ease;
}

.hero-slider .carousel-item.active .slider-bg {
  transform: scale(1.04);
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(10,30,60,0.62) 60%,
    rgba(10,30,60,0.80) 100%
  );
  z-index: 1;
}

.slider-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  padding: 2rem 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.slider-city {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  display: inline-block;
}

.slider-title {
  font-size: 2.6rem;
  font-weight: 700;
  color: #ffffff;
  max-width: 800px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.slider-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
  font-style: italic;
}

.btn-slider-primary {
  background: #009edb;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-slider-primary:hover {
  background: #0076a8;
  color: #fff;
}

.btn-slider-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 10px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-slider-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

.hero-slider .carousel-indicators {
  bottom: 20px;
}

.hero-slider .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: transparent;
  opacity: 0.6;
  transition: all 0.3s;
}

.hero-slider .carousel-indicators button.active {
  background: #fff;
  opacity: 1;
  width: 28px;
  border-radius: 5px;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  margin: 0 16px;
  opacity: 0.7;
  transition: all 0.2s;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
  background: rgba(0,158,219,0.7);
  opacity: 1;
}

@media (max-width: 768px) {
  .hero-slider,
  .hero-slider .carousel-inner,
  .hero-slider .carousel-item {
    height: 420px;
  }

  .slider-title {
    font-size: 1.7rem;
  }

  .slider-sub {
    display: none;
  }

  /* Language dropdown on mobile: open leftward to prevent going off-screen */
  .topbar-lang .dropdown-menu {
    right: 0;
    left: auto;
  }

  .topbar-logo {
    height: 140px;
  }
}

/* Animations */
.animate-fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-delay {
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.animate-fade-in-delay-2 {
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

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

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
  position: relative;
  margin-top: -1px;
}

.stat-item {
  padding: 2rem 1rem;
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--un-blue-dark);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--neutral-gray);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* ============================================
   Section Styles
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--un-blue), var(--un-teal));
  margin: 1.5rem auto 0;
  border-radius: 2px;
}

.bg-light-section {
  background-color: var(--neutral-light);
}

.bg-blue-section {
  background: linear-gradient(135deg, var(--un-navy) 0%, var(--un-blue-dark) 100%);
  color: var(--white);
}

.bg-blue-section .section-title::after {
  background: linear-gradient(90deg, var(--white), var(--un-blue-light));
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--un-blue) 0%, var(--un-teal) 100%);
}

/* ============================================
   Cards
   ============================================ */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

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

/* Feature Cards */
.feature-card {
  padding: 2rem;
  background: var(--white);
}

.feature-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--un-blue), var(--un-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.feature-icon i {
  font-size: 3rem;
  color: #ffffff !important;
}

.feature-icon--monitor {
  background: linear-gradient(135deg, #2196F3, #00BCD4);
}

.feature-icon--collaborate {
  background: linear-gradient(135deg, #43A047, #66BB6A);
}

.feature-icon--knowledge {
  background: linear-gradient(135deg, #FB8C00, #FFB300);
}

.feature-icon--capacity {
  background: linear-gradient(135deg, #8E24AA, #AB47BC);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
  margin-bottom: 1rem;
}

/* Report Cards */
.report-card .card-img-top,
.report-img {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-card .badge {
  font-size: 0.7rem;
  padding: 0.4em 0.8em;
}

/* Country Flag Report Card Header */
.country-flag-header {
  aspect-ratio: 2 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #f0f2f4;
}

.country-flag-header .country-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.country-code-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 2;
  backdrop-filter: blur(4px);
}

.country-flag-header .country-name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 1;
  text-align: center;
}

/* Regional report header */
.regional-flag-header {
  background: linear-gradient(135deg, var(--un-navy) 0%, var(--un-blue-dark) 100%);
}

.regional-flag-header .country-flag-emoji {
  font-size: 4.5rem;
  position: relative;
  z-index: 1;
}

/* Resource Cards */
.resource-card {
  padding: 1.5rem;
  transition: var(--transition);
}

.resource-card:hover {
  background: var(--neutral-light);
}

.resource-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.resource-icon i {
  font-size: 1.5rem;
}

.bg-primary-light { background: rgba(0, 83, 122, 0.1); }
.bg-success-light { background: rgba(76, 159, 56, 0.1); }
.bg-warning-light { background: rgba(253, 105, 37, 0.1); }

/* ============================================
   Buttons
   ============================================ */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--un-blue), var(--un-blue-dark));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--un-blue-dark), var(--un-navy));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 83, 122, 0.4);
}

.btn-outline-primary {
  border: 2px solid var(--un-blue);
  color: var(--un-blue);
  background: transparent;
}

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

.btn-light {
  background: var(--white);
  color: var(--un-blue-dark);
}

.btn-light:hover {
  background: var(--neutral-light);
  color: var(--un-blue-dark);
}

.btn-outline-light {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--un-blue-dark);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ============================================
   Country Section
   ============================================ */
.map-placeholder {
  background: var(--white);
  border-radius: var(--border-radius);
}

.country-list {
  height: 100%;
}

.country-list .list-group-item {
  border: none;
  padding: 1rem;
  transition: var(--transition);
}

.country-list .list-group-item:hover {
  background: var(--neutral-light);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--un-blue) 0%, var(--un-teal) 100%);
}

.cta-section h2 {
  color: var(--white);
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
  background: var(--un-navy);
  color: rgba(255,255,255,0.85);
  padding: 4rem 0 2rem;
}

.footer-logo {
  height: 130px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
  display: block;
}

.main-footer h5,
.main-footer h6 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links {
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--un-blue-light);
  padding-left: 5px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  margin-right: 0.75rem;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--un-blue);
  transform: translateY(-3px);
  color: var(--white);
}

.newsletter-form .form-control {
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 0.75rem 1rem;
}

.newsletter-form .btn {
  border-radius: 0 8px 8px 0;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-un-blue { color: var(--un-blue) !important; }
.text-un-navy { color: var(--un-navy) !important; }
.bg-un-blue { background-color: var(--un-blue) !important; }
.bg-un-navy { background-color: var(--un-navy) !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: 70vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }

  .stat-number {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .feature-icon {
    width: 70px;
    height: 70px;
  }

  .feature-icon i {
    font-size: 2rem;
  }
}

/* ============================================
   Drupal Specific Overrides
   ============================================ */
.region-content {
  padding: 0;
}

.path-frontpage .region-content {
  max-width: 100%;
}

.block-system-main-block {
  margin: 0;
}

/* Hide default Drupal elements on front page */
.path-frontpage .block-page-title-block,
.path-frontpage article > h2 {
  display: none;
}

/* Admin toolbar adjustment */
body.toolbar-fixed {
  padding-top: 0 !important;
}

body.toolbar-fixed .main-header {
  top: 39px;
}

body.toolbar-horizontal.toolbar-tray-open .main-header {
  top: 79px;
}

/* ============================================
   Login Page Styles
   ============================================ */
.login-page {
  min-height: 100vh;
}

.login-container {
  min-height: 100vh;
}

.login-branding {
  background: linear-gradient(135deg, var(--un-navy) 0%, var(--un-blue-dark) 50%, var(--un-teal) 100%);
  position: relative;
  overflow: hidden;
}

.branding-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem;
}

.branding-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="2.5" fill="rgba(255,255,255,0.06)"/></svg>');
  background-size: 100px;
  animation: float 20s linear infinite;
}

.branding-inner {
  position: relative;
  z-index: 2;
  color: var(--white);
  text-align: center;
}

.branding-inner h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.branding-inner .lead {
  opacity: 0.9;
  font-size: 1.1rem;
}

.branding-features {
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
}

.branding-features .feature-item {
  padding: 0.75rem 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.branding-features .feature-item i {
  color: var(--un-blue-light);
}

.un-habitat-badge {
  margin-top: 3rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.login-form-section {
  background: var(--white);
  padding: 2rem;
}

.login-form-container {
  max-width: 400px;
  width: 100%;
  padding: 2rem;
}

.login-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--un-blue), var(--un-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.login-icon i {
  font-size: 2.5rem;
  color: var(--white);
}

.login-form-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.login-form-body .form-item {
  margin-bottom: 1.5rem;
}

.login-form-body label {
  font-weight: 600;
  color: var(--un-blue-dark);
  margin-bottom: 0.5rem;
}

.login-form-body input[type="text"],
.login-form-body input[type="password"],
.login-form-body input[type="email"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.login-form-body input[type="text"]:focus,
.login-form-body input[type="password"]:focus,
.login-form-body input[type="email"]:focus {
  border-color: var(--un-blue);
  box-shadow: 0 0 0 3px rgba(0, 83, 122, 0.1);
  outline: none;
}

.login-form-body input[type="submit"],
.login-form-body button[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--un-blue), var(--un-blue-dark));
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.login-form-body input[type="submit"]:hover,
.login-form-body button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--un-blue-dark), var(--un-navy));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 83, 122, 0.4);
}

.login-language-switcher {
  position: fixed;
  top: 25px;
  right: 20px;
  z-index: 1000;
}

.login-language-switcher .btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-language-switcher .btn:hover {
  background: #fff;
  border-color: var(--un-blue);
}

.login-language-switcher .dropdown-menu {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 8px;
}

.login-language-switcher .dropdown-item {
  padding: 0.5rem 1rem;
}

.login-language-switcher .dropdown-item.active {
  background-color: var(--un-blue);
  color: #fff;
}

.login-page-footer {
  background: var(--neutral-light);
  padding: 1rem 0;
  border-top: 1px solid #e0e0e0;
}

.mobile-logo i {
  color: var(--un-blue);
}

/* ============================================
   Reports Page Styles
   ============================================ */
.page-hero-section {
  background: linear-gradient(135deg, var(--un-blue) 0%, var(--un-teal) 50%, var(--un-blue-dark) 100%);
  position: relative;
  padding: 3rem 0;
}

.page-hero-title {
  font-size: 2.75rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.page-hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.page-hero-section .breadcrumb {
  background: transparent;
  margin-bottom: 0;
}

.page-hero-section .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255,255,255,0.5);
}

.filter-section {
  border-bottom: 1px solid #e0e0e0;
}

.filter-buttons .btn.active {
  background: var(--un-blue);
  border-color: var(--un-blue);
  color: var(--white);
}

.search-box .input-group {
  border-radius: 8px;
  overflow: hidden;
}

.search-box .form-control {
  border-left: none;
}

.search-box .input-group-text {
  border-right: none;
}

.featured-report-card {
  overflow: hidden;
}

.featured-report-card .report-cover {
  min-height: 200px;
}

.bg-gradient-teal {
  background: linear-gradient(135deg, var(--un-teal), var(--un-green)) !important;
}

.resource-link-card {
  border: 2px solid transparent;
  transition: var(--transition);
}

.resource-link-card:hover {
  border-color: var(--un-blue);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.report-card .report-meta {
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* Pagination styles */
.pagination .page-link {
  border: none;
  color: var(--un-blue-dark);
  padding: 0.75rem 1rem;
  margin: 0 0.25rem;
  border-radius: 8px;
}

.pagination .page-item.active .page-link {
  background: var(--un-blue);
  color: var(--white);
}

.pagination .page-link:hover {
  background: var(--neutral-light);
  color: var(--un-blue);
}

/* ============================================
   Responsive Adjustments for Login & Reports
   ============================================ */
@media (max-width: 991.98px) {
  .login-branding {
    min-height: 300px;
  }

  .branding-inner h1 {
    font-size: 2rem;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  .featured-report-card .report-cover {
    min-height: 150px;
  }
}

@media (max-width: 767.98px) {
  .login-form-container {
    padding: 1rem;
  }

  .page-hero-title {
    font-size: 1.75rem;
  }

  .page-hero-subtitle {
    font-size: 1rem;
  }

  .filter-buttons .btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   Internal Pages Styles
   ============================================ */
.page-hero-small {
  padding: 2rem 0;
  min-height: auto;
}

.page-hero-small .page-hero-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.main-content {
  min-height: 60vh;
  background: var(--neutral-light);
}

.content-wrapper {
  border-radius: var(--border-radius);
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3 {
  color: var(--un-blue-dark);
}

/* Drupal form styling */
.content-wrapper .form-item {
  margin-bottom: 1.5rem;
}

.content-wrapper label {
  font-weight: 600;
  color: var(--un-blue-dark);
  margin-bottom: 0.5rem;
  display: block;
}

.content-wrapper input[type="text"],
.content-wrapper input[type="password"],
.content-wrapper input[type="email"],
.content-wrapper input[type="tel"],
.content-wrapper input[type="url"],
.content-wrapper input[type="number"],
.content-wrapper input[type="date"],
.content-wrapper textarea,
.content-wrapper select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.content-wrapper input[type="text"]:focus,
.content-wrapper input[type="password"]:focus,
.content-wrapper input[type="email"]:focus,
.content-wrapper input[type="tel"]:focus,
.content-wrapper input[type="url"]:focus,
.content-wrapper input[type="number"]:focus,
.content-wrapper input[type="date"]:focus,
.content-wrapper textarea:focus,
.content-wrapper select:focus {
  border-color: var(--un-blue);
  box-shadow: 0 0 0 3px rgba(0, 83, 122, 0.1);
  outline: none;
}

.content-wrapper input[type="submit"],
.content-wrapper button[type="submit"] {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--un-blue), var(--un-blue-dark));
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.content-wrapper input[type="submit"]:hover,
.content-wrapper button[type="submit"]:hover {
  background: linear-gradient(135deg, var(--un-blue-dark), var(--un-navy));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 83, 122, 0.4);
}

/* User profile styles */
.profile-header {
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--un-blue), var(--un-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-md);
}

.profile-avatar i {
  font-size: 3.5rem;
  color: var(--white);
}

.profile-name {
  font-size: 1.75rem;
  color: var(--un-blue-dark);
  margin-bottom: 0.5rem;
}

.profile-role {
  color: var(--neutral-gray);
  font-size: 0.9rem;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 1.5rem;
}

.profile-stat {
  text-align: center;
}

.profile-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--un-blue);
}

.profile-stat-label {
  font-size: 0.8rem;
  color: var(--neutral-gray);
  text-transform: uppercase;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.quick-action-card {
  padding: 1.5rem;
  border-radius: var(--border-radius);
  background: var(--neutral-light);
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  color: var(--neutral-dark);
}

.quick-action-card:hover {
  background: var(--un-blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-action-card i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--un-blue);
}

.quick-action-card:hover i {
  color: var(--white);
}

.quick-action-card span {
  font-weight: 600;
}

/* Dropdown menu styling */
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 0.5rem;
}

.dropdown-item {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--neutral-light);
  color: var(--un-blue);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
}

/* Tables */
.content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.content-wrapper table th,
.content-wrapper table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.content-wrapper table th {
  background: var(--neutral-light);
  font-weight: 600;
  color: var(--un-blue-dark);
}

.content-wrapper table tr:hover {
  background: rgba(0, 83, 122, 0.05);
}

/* Messages */
.messages {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.messages--status {
  background: rgba(76, 159, 56, 0.1);
  border-left: 4px solid var(--un-green);
  color: var(--un-green);
}

.messages--warning {
  background: rgba(253, 105, 37, 0.1);
  border-left: 4px solid var(--accent-orange);
  color: var(--accent-orange);
}

.messages--error {
  background: rgba(229, 36, 59, 0.1);
  border-left: 4px solid var(--accent-red);
  color: var(--accent-red);
}

/* Tabs */
.tabs {
  border-bottom: 2px solid #eee;
  margin-bottom: 2rem;
}

.tabs ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.tabs li a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--neutral-gray);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tabs li a:hover,
.tabs li a.is-active {
  color: var(--un-blue);
  border-bottom-color: var(--un-blue);
}

/* Local tasks (Drupal tabs) */
.block-local-tasks-block ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  gap: 0.5rem;
  border-bottom: 2px solid #eee;
}

.block-local-tasks-block li a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--neutral-gray);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-weight: 500;
}

.block-local-tasks-block li a:hover,
.block-local-tasks-block li a.is-active {
  color: var(--un-blue);
  border-bottom-color: var(--un-blue);
}

/* Responsive for internal pages */
@media (max-width: 767.98px) {
  .page-hero-small .page-hero-title {
    font-size: 1.5rem;
  }

  .content-wrapper {
    padding: 1.5rem !important;
  }

  .profile-stats {
    gap: 1.5rem;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   User Dashboard & Navigation
   ============================================ */
.user-nav-link {
  color: var(--neutral-dark);
  transition: var(--transition);
}

.user-nav-link:hover,
.user-nav-link.active {
  background: var(--neutral-light);
  color: var(--un-blue);
}

.user-nav-link.active {
  font-weight: 600;
}

.user-nav-link i {
  width: 20px;
  text-align: center;
}

.welcome-section {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(0, 83, 122, 0.05), rgba(157, 65, 18, 0.05));
  border-radius: var(--border-radius);
  border-left: 4px solid var(--un-blue);
}

.quick-actions-section .quick-action-card {
  background: var(--neutral-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  color: var(--neutral-dark);
}

.quick-actions-section .quick-action-card:hover {
  background: var(--un-blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-actions-section .quick-action-card i {
  font-size: 2rem;
  color: var(--un-blue);
  margin-bottom: 0.75rem;
  display: block;
}

.quick-actions-section .quick-action-card:hover i {
  color: var(--white);
}

.quick-actions-section .quick-action-card span {
  font-weight: 600;
  display: block;
}

.user-content .field {
  margin-bottom: 1rem;
}

.user-content .field__label {
  font-weight: 600;
  color: var(--un-blue-dark);
  margin-bottom: 0.25rem;
}

/* Profile avatar in sidebar */
.profile-header .profile-avatar {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.profile-header .profile-avatar i {
  font-size: 2rem;
}

/* Admin toolbar fix */
body.toolbar-fixed .main-header {
  position: relative;
  top: 0;
}

/* Hide Drupal admin messages styling conflicts */
.content-wrapper .messages__wrapper {
  margin: 0;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
  .user-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .user-nav li {
    flex: 1;
    min-width: 100px;
  }

  .user-nav-link {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 1rem !important;
  }

  .user-nav-link i {
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
  }
}

/* ============================================
   Language Switcher
   ============================================ */
.lang-switcher-toggle {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.5rem 0.75rem !important;
  font-weight: 600;
}

.lang-switcher-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.lang-dropdown {
  min-width: 150px;
}

.lang-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-dropdown .dropdown-item.active {
  background: var(--un-blue);
  color: var(--white);
}

.lang-flag {
  font-size: 1.2rem;
}

/* ============================================
   RTL (Right-to-Left) Support for Arabic
   ============================================ */
html[dir="rtl"],
body.lang-ar {
  direction: rtl;
  text-align: right;
}

/* RTL Navbar */
html[dir="rtl"] .navbar-brand {
  margin-right: 0;
  margin-left: 1rem;
}

html[dir="rtl"] .navbar-nav {
  padding-right: 0;
}

html[dir="rtl"] .ms-auto {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] .me-1 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

html[dir="rtl"] .me-2 {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

html[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

html[dir="rtl"] .ms-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
}

html[dir="rtl"] .ms-3 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

/* RTL Text alignment */
html[dir="rtl"] .text-start {
  text-align: right !important;
}

html[dir="rtl"] .text-end {
  text-align: left !important;
}

html[dir="rtl"] .text-md-start {
  text-align: right !important;
}

html[dir="rtl"] .text-md-end {
  text-align: left !important;
}

/* RTL Cards and Content */
html[dir="rtl"] .card-body {
  text-align: right;
}

html[dir="rtl"] .feature-card .card-body {
  text-align: center;
}

/* RTL Footer */
html[dir="rtl"] .footer-links a {
  padding-right: 0;
  padding-left: 5px;
}

html[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 5px;
}

html[dir="rtl"] .footer-links .fa-chevron-right {
  transform: rotate(180deg);
}

/* RTL Social Icons */
html[dir="rtl"] .social-icons a {
  margin-right: 0;
  margin-left: 0.75rem;
}

/* RTL Breadcrumb */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
  content: "\\";
  padding-right: 0;
  padding-left: 0.5rem;
}

/* RTL Form elements */
html[dir="rtl"] .input-group > .form-control {
  border-radius: 0 8px 8px 0;
}

html[dir="rtl"] .input-group > .btn {
  border-radius: 8px 0 0 8px;
}

html[dir="rtl"] .newsletter-form .form-control {
  border-radius: 0 8px 8px 0;
}

html[dir="rtl"] .newsletter-form .btn {
  border-radius: 8px 0 0 8px;
}

/* RTL Login page */
html[dir="rtl"] .login-branding {
  order: 2;
}

html[dir="rtl"] .login-form-section {
  order: 1;
}

/* RTL Lists */
html[dir="rtl"] .list-group-item {
  text-align: right;
}

html[dir="rtl"] ul {
  padding-right: 0;
  padding-left: 2rem;
}

html[dir="rtl"] .list-unstyled {
  padding-left: 0;
}

/* RTL Dropdown */
html[dir="rtl"] .dropdown-menu-end {
  left: 0;
  right: auto;
}

/* RTL Stats */
html[dir="rtl"] .stat-item {
  text-align: center;
}

/* RTL Icons positioning */
html[dir="rtl"] .fa-chevron-right::before {
  content: "\f053";
}

/* RTL User navigation */
html[dir="rtl"] .user-nav-link i {
  margin-right: 0;
  margin-left: 0.75rem;
}

/* Arabic Typography */
html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: 'Noto Sans Arabic', 'Arial', sans-serif;
}

/* RTL Quick Actions */
html[dir="rtl"] .quick-action-card {
  text-align: center;
}

/* RTL Profile */
html[dir="rtl"] .profile-header {
  text-align: center;
}

/* RTL Reports */
html[dir="rtl"] .report-meta span {
  margin-right: 0;
  margin-left: 1rem;
}

/* Fix for Bootstrap RTL compatibility */
html[dir="rtl"] .navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

html[dir="rtl"] .navbar-toggler {
  margin-left: 0;
  margin-right: auto;
}

/* ============================================
   Period Filter Buttons (Reports Page)
   ============================================ */
.period-filter-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.period-filter-buttons .btn.active {
  font-weight: 600;
}

/* ============================================
   Best Practices Page
   ============================================ */
.best-practices-section .card .card-img-top {
  min-height: 130px;
}

.best-practices-highlights-section .card .card-img-top {
  min-height: 120px;
}

/* ============================================
   Dashboards Page
   ============================================ */
.dashboard-axis-section .card .card-img-top {
  min-height: 130px;
}

.coming-soon-placeholder {
  max-width: 700px;
  margin: 0 auto;
}

.umf-indicators-section .table th,
.umf-indicators-section .table td {
  vertical-align: middle;
}

/* ============================================
   Dashboard — Country Comparison (color-only)
   ============================================ */

.db-section { background: #f4f6f9; }

.db-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.db-main-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a3a5c;
  margin: 0;
}

.db-main-sub {
  font-size: 1rem;
  color: #777;
  margin: 2px 0 0;
}

/* Country selector */
.db-country-selector {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.db-selector-label {
  font-size: 15px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.db-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.db-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #f0f0f0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}

.db-chip.active {
  background: #1a3a5c;
  color: #fff;
  border-color: #1a3a5c;
}

.db-add-wrap select.db-add-select {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px dashed #aaa;
  background: transparent;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.db-add-wrap select.db-add-select:hover {
  border-color: #009edb;
  color: #009edb;
}

/* Legend bar */
.db-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #e4e8ee;
  font-size: 14px;
  color: #555;
}

.db-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.db-legend-avg { opacity: 0.65; font-style: italic; }

.db-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.db-dot-high   { background: #198754; }
.db-dot-medium { background: #fd7e14; }
.db-dot-low    { background: #dc3545; }
.db-dot-avg    { background: #6c757d; }

/* Grid of country columns */
.db-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.db-country-col {
  flex: 1;
  min-width: 240px;
  max-width: 400px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e6ee;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.db-country-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a3a5c;
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 16px;
}

.db-col-flag { font-size: 1.4rem; }
.db-col-name { flex: 1; }

.db-col-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}
.db-col-remove:hover { color: #fff; }

/* Indicator cards inside a column */
.db-ind-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f5;
  transition: background 0.15s;
}
.db-ind-card:last-child { border-bottom: none; }
.db-ind-card:hover { background: #f8fafc; }

.db-ind-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #1a3a5c;
  flex-shrink: 0;
  margin-top: 2px;
}

.db-ind-info { flex: 1; min-width: 0; }

.db-ind-name {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-ind-bars { display: flex; flex-direction: column; gap: 4px; }

.db-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.db-bar-label {
  width: 90px;
  color: #777;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.db-bar-track {
  flex: 1;
  height: 8px;
  background: #eef0f3;
  border-radius: 4px;
  overflow: hidden;
}

.db-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.db-bar-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
}

.db-bar-tag-avg { opacity: 0.7; }
.db-bar-avg .db-bar-label { color: #aaa; font-style: italic; }

/* Details panel */
.db-details-panel {
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.db-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.db-details-header h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a3a5c;
  margin: 0;
}

.db-kpi-table {
  font-size: 14px;
  border-collapse: separate;
  border-spacing: 0;
}

.db-kpi-table thead th {
  background: #f0f4f8;
  color: #1a3a5c;
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 2px solid #dce3ec;
  white-space: nowrap;
}

.db-kpi-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}

.db-kpi-table tbody tr:hover { background: #f8fafc; }

.db-kpi-score {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.db-kpi-high   { background: #d1f0e0; color: #0d6b3a; }
.db-kpi-medium { background: #ffe8cc; color: #8a4b00; }
.db-kpi-low    { background: #fde0e3; color: #8b1a23; }
.db-kpi-avg    { opacity: 0.75; font-style: italic; }

/* KPI expanded panel — sub-indicator rows */
.db-kpi-theme-row td {
  background: #e8f0f9;
  color: #1a3a5c;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 12px;
  border-top: 2px solid #c5d6e8;
}
.db-kpi-sdg {
  display: inline-block;
  background: #1a3a5c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.db-kpi-desc { font-size: 12.5px; color: #6c757d; margin-top: 2px; }
.db-kpi-method { font-size: 11px; color: #888; margin-top: 1px; font-style: italic; }
.db-kpi-source-row td {
  font-size: 11px;
  color: #aaa;
  padding: 2px 12px 8px;
  font-style: italic;
  border-bottom: none;
}

/* Color dot for KPI cells */
.db-kpi-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  cursor: help;
  transition: transform .15s;
}
.db-kpi-dot:hover { transform: scale(1.2); }
.db-kpi-dot.db-kpi-high   { background: #d1f0e0; color: #0d6b3a; }
.db-kpi-dot.db-kpi-medium { background: #ffe8cc; color: #8a4b00; }
.db-kpi-dot.db-kpi-low    { background: #fde0e3; color: #8b1a23; }
.db-kpi-dot.db-kpi-avg    { background: #e8edf3; color: #4a5568; opacity: .8; }

/* GDP correlation section */
.db-gdp-section {
  margin-top: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e0e6ee;
}
.db-gdp-section h6 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1a3a5c;
  margin-bottom: 12px;
}
.db-gdp-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.db-gdp-card {
  flex: 1 1 200px;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  padding: 10px 14px;
}
.db-gdp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.db-gdp-flag { font-size: 1.3rem; }
.db-gdp-name { font-weight: 700; font-size: 13px; color: #1a3a5c; }
.db-gdp-val  { margin-left: auto; font-size: 12px; font-weight: 700; color: #2d6a4f; background: #d1f0e0; padding: 2px 8px; border-radius: 10px; }
.db-gdp-note { font-size: 12.5px; color: #555; line-height: 1.5; }

/* Indicator card SDG badge */
.db-ind-sdg {
  font-size: 10.5px;
  font-weight: 700;
  color: #1a3a5c;
  background: #e8f0f9;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .db-country-col { min-width: 100%; max-width: 100%; }
  .db-bar-label   { width: 60px; }
  .db-gdp-card    { flex: 1 1 100%; }
}
