/* ============================================================
   MoveLog — UNHCR Themed Full Responsive CSS
   Official UNHCR Blue: #0072BC
   ============================================================ */

:root {
  /* UNHCR Official Colors */
  --unhcr-blue: #0072BC;
  --unhcr-blue-hover: #05568B;
  --unhcr-blue-light: #CDE3F1;
  --unhcr-blue-pale: #EAF3F9;
  --unhcr-navy: #0B3754;
  --unhcr-dark: #00264D;
  --unhcr-white: #FFFFFF;
  --unhcr-gray-50: #F8F9FA;
  --unhcr-gray-100: #F1F3F5;
  --unhcr-gray-200: #E9ECEF;
  --unhcr-gray-300: #DEE2E6;
  --unhcr-gray-500: #ADB5BD;
  --unhcr-gray-700: #495057;
  --unhcr-gray-900: #212529;
  --unhcr-green: #32C189;
  --unhcr-green-light: #E8F7F1;
  --unhcr-red: #D25A45;
  --unhcr-red-light: #FCE9E5;
  --unhcr-bordeaux: #7A1F2B;
  --unhcr-bordeaux-hover: #5E1821;
  --unhcr-orange: #FFC740;
  --unhcr-orange-light: #FFF4D6;
  --unhcr-gold: #FFC740;
  --unhcr-teal: #6CD8FD;
  --sidebar-width: 260px;
  --topnav-height: 56px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: Lato, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #F8FBFD 0%, #F1F7FB 100%);
  color: var(--unhcr-gray-900);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== LAYOUT: Sidebar + Main ===== */
#wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--unhcr-navy) 0%, var(--unhcr-dark) 100%);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar .brand {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sidebar .brand-logo {
  width: 40px;
  height: 40px;
  background: var(--unhcr-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar .brand-text {
  color: white;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}

.sidebar .brand-text small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.geo-picker-map {
    width: 100%;
    height: 380px;
    border-radius: 16px;
    border: 1px solid var(--unhcr-gray-300);
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 34, 77, 0.08);
}

.geo-picker-search {
    min-width: 220px;
}

.geo-picker-search-wrap {
    width: 320px;
}

.geo-picker-suggestions {
    z-index: 1050;
    top: calc(100% + 0.25rem);
    left: 0;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 0.75rem;
}

.stock-scroll-table,
.scroll-table-10 {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
    margin-top: 0.35rem;
    border: 1px solid var(--unhcr-gray-200);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
    -webkit-overflow-scrolling: touch;
}

.stock-scroll-table .data-table,
.scroll-table-10 .data-table {
    margin-bottom: 0;
}

.stock-scroll-table thead th,
.scroll-table-10 thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: inset 0 -1px 0 var(--unhcr-gray-200);
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.7);
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
  white-space: nowrap;
}

.sidebar .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  text-decoration: none;
}

.sidebar .nav-link.active {
  background: rgba(0, 114, 188, 0.24);
  color: white;
  border-left-color: var(--unhcr-gold);
  font-weight: 600;
}

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.sidebar .nav-section {
  padding: 0.75rem 1.25rem 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-top: 0.25rem;
}

/* User footer in sidebar */
.user-footer {
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-details {
  overflow: hidden;
  min-width: 0;
}

.user-name {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  width: 100%;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.18);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TOP NAV ===== */
.top-nav {
  background: white;
  border-bottom: 1px solid var(--unhcr-blue-light);
  padding: 0 1.25rem;
  height: var(--topnav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  flex-shrink: 0;
}

.top-nav-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.top-nav-end {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--unhcr-green);
  font-weight: 500;
  flex-shrink: 0;
}

.nav-status-dot {
  width: 8px;
  height: 8px;
  background: var(--unhcr-green);
  border-radius: 50%;
  display: inline-block;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--unhcr-navy);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--unhcr-gray-300);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  color: var(--unhcr-navy);
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

/* ===== PAGE BODY ===== */
.page-body {
  padding: 1.25rem;
  flex: 1;
}

/* ===== CARDS ===== */
.kpi-card {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--unhcr-gray-200);
  padding: 1.25rem;
  height: 100%;
  min-height: 6.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.kpi-card .kpi-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  background: none;
  color: var(--unhcr-blue);
  overflow: hidden;
}

.kpi-card .kpi-icon img,
.kpi-card .kpi-icon svg {
  width: 72%;
  height: 72%;
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  display: block;
}

.population-profile-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}

.population-profile-icon img,
.population-profile-icon svg {
  width: 78%;
  height: 78%;
  max-width: 78%;
  max-height: 78%;
}

.kpi-card .kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.05rem;
}

.kpi-card .kpi-label {
  font-size: 0.75rem;
  color: var(--unhcr-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.dashboard-action-btn {
  padding: 0.42rem 0.9rem;
  font-size: 0.875rem;
  font-family: inherit;
  border-radius: 999px;
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0.2rem 0.5rem rgba(15, 23, 42, 0.06);
}

.dashboard-hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
  font-family: inherit;
}

.dashboard-hero-title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  font-family: inherit;
}

.dashboard-hero-subtitle {
  font-size: 0.92rem;
  line-height: 1.35;
  max-width: 58ch;
  opacity: 0.92;
  font-family: inherit;
}

.dashboard-scope-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.25rem;
  font-family: inherit;
}

.dashboard-scope-lines {
  line-height: 1.45;
  font-size: 0.875rem;
  font-family: inherit;
}

.dashboard-shell .data-card {
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, rgba(11, 46, 79, 0.05), transparent 25%),
    linear-gradient(180deg, rgba(251, 252, 254, 0.99) 0%, rgba(243, 246, 250, 0.98) 100%);
  box-shadow: 0 0.55rem 1.35rem rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-shell .data-card:hover {
  box-shadow: 0 0.85rem 1.7rem rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-shell .card-header-custom {
  background: linear-gradient(180deg, rgba(238, 242, 248, 0.98) 0%, rgba(250, 252, 255, 0.99) 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  padding: 0.95rem 1.15rem;
}

.dashboard-shell .card-header-custom h6 i,
.dashboard-shell .card-header-custom h6 img {
  width: 1.55rem;
  height: 1.55rem;
  padding: 0.2rem;
  border-radius: 0.55rem;
  background: rgba(11, 46, 79, 0.1);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.dashboard-shell .card-header-custom h6 {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.dashboard-shell .data-card > .p-2,
.dashboard-shell .data-card > .p-3,
.dashboard-shell .data-card > .p-4 {
  padding: 1rem 1.1rem;
}

.dashboard-shell .empty-state {
  padding: 2.25rem 1rem;
}

.dashboard-shell .empty-state i {
  color: rgba(11, 46, 79, 0.18);
}

.dashboard-shell .population-profile-icon {
  background: rgba(11, 46, 79, 0.08) !important;
  border: 1px solid rgba(11, 46, 79, 0.14);
}

.dashboard-shell .population-profile-icon img,
.dashboard-shell .population-profile-icon svg {
  filter: brightness(0.42) saturate(0.8);
}

.dashboard-shell .profile-table th {
  background: #edf2f7;
  color: #0b2e4f;
}

.dashboard-shell .profile-table td {
  color: #1f2937;
}

.dashboard-kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.15;
  font-family: inherit;
}

.dashboard-population-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
}

.dashboard-pulse-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
  color: #0b2e4f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dashboard-mini-value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: inherit;
  color: #0b2e4f;
}

.dashboard-movement-metric {
  height: 100%;
  min-height: 4.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-movement-metric .dashboard-mini-value {
  font-size: 1.1rem;
}

.dashboard-movement-metric-emphasis {
  background: rgba(11, 46, 79, 0.04);
  border-color: rgba(11, 46, 79, 0.12);
}

.dashboard-side-kpis {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
  align-content: space-between;
  min-height: 100%;
}

.dashboard-side-kpi {
  height: 100%;
  min-height: 6.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(249, 250, 251, 0.94) 100%);
  padding: 0.85rem 0.9rem;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.04);
}

.dashboard-side-kpi-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  line-height: 1;
  flex: 0 0 32px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0.25rem 0.6rem rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-side-kpi-icon i {
  font-size: 1rem;
}

.dashboard-side-kpi-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dashboard-side-kpi-navy {
  --dashboard-accent: var(--unhcr-navy);
}

.dashboard-side-kpi-navy .dashboard-side-kpi-icon {
  color: #072033;
  background: rgba(11, 46, 79, 0.18);
}

.dashboard-side-kpi-orange {
  --dashboard-accent: var(--unhcr-orange);
}

.dashboard-side-kpi-orange .dashboard-side-kpi-icon {
  color: #8a3d06;
  background: rgba(229, 117, 31, 0.18);
}

.dashboard-side-kpi-teal {
  --dashboard-accent: var(--unhcr-teal);
}

.dashboard-side-kpi-teal .dashboard-side-kpi-icon {
  color: #004d4d;
  background: rgba(0, 128, 128, 0.18);
}

.dashboard-side-kpi-blue {
  --dashboard-accent: var(--unhcr-blue);
}

.dashboard-side-kpi-blue .dashboard-side-kpi-icon {
  color: #003e68;
  background: rgba(0, 114, 188, 0.18);
}

.dashboard-side-kpi-red {
  --dashboard-accent: var(--unhcr-red);
}

.dashboard-side-kpi-red .dashboard-side-kpi-icon {
  color: #7a1e28;
  background: rgba(220, 53, 69, 0.18);
}

.dashboard-side-kpi-green {
  --dashboard-accent: var(--unhcr-green);
}

.dashboard-side-kpi-green .dashboard-side-kpi-icon {
  color: #14532d;
  background: rgba(25, 135, 84, 0.18);
}

.dashboard-side-kpi-icon img,
.dashboard-side-kpi-icon svg,
.dashboard-header-icon {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-block;
  vertical-align: -0.15em;
}

.dashboard-header-icon {
  background: rgba(15, 23, 42, 0.04);
  padding: 0.15rem;
  border-radius: 0.45rem;
}

.dashboard-side-kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: #0b2e4f;
  font-family: inherit;
  margin-top: 0.05rem;
}

.dashboard-side-kpi:hover {
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 0.6rem 1.25rem rgba(15, 23, 42, 0.08);
}

.dashboard-side-kpi:hover .dashboard-side-kpi-icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 0.45rem 0.9rem rgba(15, 23, 42, 0.12);
}

.dashboard-side-kpi-label {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--unhcr-gray-700);
  font-family: inherit;
  letter-spacing: 0.01em;
}

.dashboard-side-kpi-sub {
  font-size: 0.76rem;
  line-height: 1.15;
  color: var(--unhcr-gray-500);
  font-family: inherit;
}

.dashboard-bottom-row .data-card {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 0.55rem 1.2rem rgba(15, 23, 42, 0.05);
}

.dashboard-bottom-row .card-header-custom {
  padding-bottom: 0.65rem;
}

.dashboard-signals .dashboard-signal-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.05);
}

.dashboard-signals .dashboard-signal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  border-radius: 999px 0 0 999px;
}

.dashboard-signals .dashboard-signal-card.alert-danger {
  background: linear-gradient(180deg, rgba(248, 215, 218, 0.92) 0%, rgba(255, 255, 255, 0.985) 100%);
}

.dashboard-signals .dashboard-signal-card.alert-danger::before {
  background: var(--bs-danger);
}

.dashboard-signals .dashboard-signal-card.alert-warning {
  background: linear-gradient(180deg, rgba(255, 243, 205, 0.92) 0%, rgba(255, 255, 255, 0.985) 100%);
}

.dashboard-signals .dashboard-signal-card.alert-warning::before {
  background: var(--bs-warning);
}

.dashboard-signals .dashboard-signal-card.alert-success {
  background: linear-gradient(180deg, rgba(209, 231, 221, 0.92) 0%, rgba(255, 255, 255, 0.985) 100%);
}

.dashboard-signals .dashboard-signal-card.alert-success::before {
  background: var(--bs-success);
}

.dashboard-signal-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 0.3rem 0.7rem rgba(15, 23, 42, 0.12);
}

.dashboard-signal-icon i {
  font-size: 1rem;
}

.dashboard-signal-card.alert-danger .dashboard-signal-icon {
  background: var(--bs-danger);
}

.dashboard-signal-card.alert-warning .dashboard-signal-icon {
  background: var(--bs-warning);
  color: #3f2d00;
}

.dashboard-signal-card.alert-success .dashboard-signal-icon {
  background: var(--bs-success);
}

.dashboard-signal-body {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-signal-title {
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-signal-description {
  margin-top: 0.15rem;
  color: #374151;
}

.dashboard-signal-badge {
  margin-top: 0.05rem;
  border-radius: 999px;
  padding-inline: 0.55rem;
  font-weight: 700;
}

.dashboard-bottom-row .p-2.p-md-3 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.dashboard-bottom-row .dashboard-reason-label,
.dashboard-bottom-row .dashboard-reason-count {
  font-size: 0.9rem;
}

.dashboard-small-label {
  font-size: 0.82rem;
  line-height: 1.15;
  font-family: inherit;
}

.dashboard-reason-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
}

.dashboard-reason-count {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
  color: #0b2e4f;
}

.dashboard-map-wrap {
  width: 100%;
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--unhcr-gray-300);
  background: #f8fafc;
}

.dashboard-map-canvas {
  width: 100%;
  height: 100%;
  position: relative;
}

.dashboard-map-label-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.dashboard-map-wrap-fullscreen {
  min-height: calc(100vh - 10rem);
  max-height: none;
  aspect-ratio: auto;
}

.dashboard-map-canvas-fullscreen {
  height: calc(100vh - 10rem);
}

.dashboard-map-card-fullscreen {
  position: fixed;
  inset: 1rem;
  z-index: 1080;
  margin: 0 !important;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.28);
}

.dashboard-map-shell {
  height: 100%;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.dashboard-map-card-fullscreen .dashboard-map-shell {
  min-height: calc(100vh - 10rem);
  max-width: none;
  height: auto;
}

.dashboard-map-card {
  display: flex;
  flex-direction: column;
}

.dashboard-map-tooltip.leaflet-tooltip {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 114, 188, 0.22);
  border-radius: 12px;
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.14);
  color: var(--unhcr-gray-800);
  padding: 0.25rem 0.55rem;
}

.dashboard-map-tooltip.leaflet-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.7);
}

.dashboard-map-html-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06rem;
  position: absolute;
  background: rgba(255, 255, 255, 0.50);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 13px;
  box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.18);
  color: #0f172a;
  padding: 0.34rem 0.56rem;
  backdrop-filter: blur(3px);
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
  transform: translateZ(0);
}

.dashboard-map-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  line-height: 1.05;
  white-space: nowrap;
}

.dashboard-map-canvas .leaflet-pane .leaflet-tooltip-pane {
  pointer-events: none;
}

.dashboard-map-label-name {
  font-size: 0.74rem;
  font-weight: 700;
}

.dashboard-map-label-count {
  font-size: 0.7rem;
  color: #0b2e4f;
  font-weight: 700;
}

.dashboard-map-html-label .dashboard-map-label-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.05;
}

.dashboard-map-html-label .dashboard-map-label-count {
  font-size: 0.72rem;
  color: #0b2e4f;
  font-weight: 700;
  line-height: 1.05;
}

.dashboard-shell .text-primary,
.dashboard-shell .text-info,
.dashboard-shell .text-success,
.dashboard-shell .text-warning,
.dashboard-shell .text-danger {
  font-weight: 700;
}

.dashboard-shell .text-primary {
  color: #0b2e4f !important;
}

.dashboard-shell .text-info {
  color: #0b4f73 !important;
}

.dashboard-shell .text-success {
  color: #14532d !important;
}

.dashboard-shell .text-warning {
  color: #8a3d06 !important;
}

.dashboard-shell .text-danger {
  color: #7a1e28 !important;
}

.dashboard-shell .dashboard-exits,
.dashboard-shell .dashboard-exits .dashboard-mini-value {
  color: #6d1a22 !important;
}

.dashboard-shell .dashboard-exits .dashboard-small-label {
  color: #6d1a22 !important;
}

.dashboard-shell .badge[style*="var(--unhcr-red)"] {
  background: #7a1e28 !important;
}

.dashboard-shell .badge[style*="var(--unhcr-blue)"] {
  background: #0b2e4f !important;
}

.report-metric {
  background: var(--unhcr-gray-50);
  border: 1px solid var(--unhcr-gray-200);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.report-metric span {
  font-size: 0.72rem;
  color: var(--unhcr-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.report-metric strong {
  font-size: 1.15rem;
  color: var(--unhcr-dark);
  line-height: 1.1;
}

/* ===== DATA CARD ===== */
.data-card {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--unhcr-gray-200);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.data-card .card-header-custom {
  background: var(--unhcr-blue-pale);
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--unhcr-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.data-card .card-header-custom h6 {
  margin: 0;
  font-weight: 600;
  color: var(--unhcr-navy);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

/* ===== TABLES ===== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.data-table th {
  background: var(--unhcr-gray-50);
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--unhcr-gray-700);
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid var(--unhcr-gray-300);
  white-space: nowrap;
}

.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--unhcr-gray-200);
  font-size: 0.85rem;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--unhcr-blue-light);
}

.profile-table-wrap {
  overflow: hidden;
}

.profile-table {
  min-width: 0;
  table-layout: fixed;
}

.profile-table th,
.profile-table td {
  white-space: normal;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
}

.profile-table th:first-child,
.profile-table td:first-child {
  width: 42%;
}

.profile-table th:nth-child(2),
.profile-table th:nth-child(3),
.profile-table th:nth-child(4),
.profile-table td:nth-child(2),
.profile-table td:nth-child(3),
.profile-table td:nth-child(4) {
  width: 19.333%;
}

/* ===== STATUS BADGES ===== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active { background: var(--unhcr-green-light); color: var(--unhcr-green); }
.badge-empty { background: #000000; color: #ffffff; border: 1px solid #000000; }
.badge-hold { background: #FFF4D6; color: #684D0B; border: 1px solid #E4A202; }
.badge-transit { background: var(--unhcr-blue-light); color: var(--unhcr-blue-hover); }
.badge-inactive { background: var(--unhcr-gray-200); color: var(--unhcr-gray-700); border: 1px solid var(--unhcr-gray-300); }
.badge-closed { background: var(--unhcr-red-light); color: var(--unhcr-red); }

/* ===== BUTTONS ===== */
.btn-unhcr,
a.btn-unhcr {
  background: var(--unhcr-blue);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(11, 55, 84, 0.08);
}

.btn-unhcr:hover, .btn-unhcr:focus,
a.btn-unhcr:hover, a.btn-unhcr:focus {
  background: var(--unhcr-blue-hover);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.14);
  transform: translateY(-1px);
}

.btn-unhcr:disabled,
a.btn-unhcr:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-unhcr-outline,
a.btn-unhcr-outline {
  background: transparent;
  color: var(--unhcr-blue);
  border: 1px solid var(--unhcr-blue);
  border-radius: 6px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(11, 55, 84, 0.06);
}

.btn-unhcr-outline:hover,
a.btn-unhcr-outline:hover,
.btn-unhcr-outline:focus,
a.btn-unhcr-outline:focus {
  background: var(--unhcr-blue);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.12);
  transform: translateY(-1px);
}

.btn-unhcr-dark,
a.btn-unhcr-dark {
  background: var(--unhcr-navy);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-unhcr-dark:hover,
.btn-unhcr-dark:focus,
a.btn-unhcr-dark:hover,
a.btn-unhcr-dark:focus {
  background: var(--unhcr-blue-hover);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.14);
  transform: translateY(-1px);
}

/* ===== FINAL UNIFIED BUTTON LOOK =====
   Every action button uses the same default visual pattern as Edit Group:
   outlined UNHCR blue with a blue fill on hover. */
.btn:not(.btn-link):not(.btn-close),
a.btn:not(.btn-link):not(.btn-close),
.btn-unhcr,
a.btn-unhcr,
.btn-unhcr-outline,
a.btn-unhcr-outline,
.btn-unhcr-dark,
a.btn-unhcr-dark,
.btn-primary,
a.btn-primary,
.btn-secondary,
a.btn-secondary,
.btn-danger,
a.btn-danger,
.btn-success,
a.btn-success,
.btn-warning,
a.btn-warning,
.btn-info,
a.btn-info,
.btn-light,
a.btn-light,
.btn-outline-primary,
a.btn-outline-primary,
.btn-outline-secondary,
a.btn-outline-secondary,
.btn-outline-danger,
a.btn-outline-danger,
.btn-outline-success,
a.btn-outline-success,
.btn-outline-warning,
a.btn-outline-warning,
.btn-outline-info,
a.btn-outline-info,
.btn-outline-light,
a.btn-outline-light,
.btn-unhcr-danger,
a.btn-unhcr-danger {
  background: transparent !important;
  color: var(--unhcr-blue) !important;
  border: 1px solid var(--unhcr-blue) !important;
  box-shadow: none !important;
}

.btn-danger,
a.btn-danger,
.btn-outline-danger,
a.btn-outline-danger,
.btn-unhcr-danger,
a.btn-unhcr-danger {
  background: transparent !important;
  color: var(--unhcr-bordeaux) !important;
  border-color: var(--unhcr-bordeaux) !important;
}

.btn-danger,
a.btn-danger,
.btn-unhcr-danger {
  background: transparent !important;
  color: var(--unhcr-bordeaux) !important;
}

.btn-outline-danger,
a.btn-outline-danger {
  background: transparent !important;
}

.btn-danger:hover,
.btn-danger:focus,
a.btn-danger:hover,
a.btn-danger:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
a.btn-outline-danger:hover,
a.btn-outline-danger:focus,
.btn-unhcr-danger:hover,
.btn-unhcr-danger:focus,
a.btn-unhcr-danger:hover,
a.btn-unhcr-danger:focus {
  background: var(--unhcr-bordeaux-hover) !important;
  color: white !important;
  border-color: var(--unhcr-bordeaux-hover) !important;
  box-shadow: 0 4px 10px rgba(122, 31, 43, 0.14) !important;
}

.btn:not(.btn-link):not(.btn-close):hover,
.btn:not(.btn-link):not(.btn-close):focus,
a.btn:not(.btn-link):not(.btn-close):hover,
a.btn:not(.btn-link):not(.btn-close):focus,
.btn-unhcr:hover,
.btn-unhcr:focus,
a.btn-unhcr:hover,
a.btn-unhcr:focus,
.btn-unhcr-outline:hover,
.btn-unhcr-outline:focus,
a.btn-unhcr-outline:hover,
a.btn-unhcr-outline:focus,
.btn-unhcr-dark:hover,
.btn-unhcr-dark:focus,
a.btn-unhcr-dark:hover,
a.btn-unhcr-dark:focus,
.btn-primary:hover,
.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus,
a.btn-secondary:hover,
a.btn-secondary:focus,
.btn-danger:hover,
.btn-danger:focus,
a.btn-danger:hover,
a.btn-danger:focus,
.btn-success:hover,
.btn-success:focus,
a.btn-success:hover,
a.btn-success:focus,
.btn-warning:hover,
.btn-warning:focus,
a.btn-warning:hover,
a.btn-warning:focus,
.btn-info:hover,
.btn-info:focus,
a.btn-info:hover,
a.btn-info:focus,
.btn-light:hover,
.btn-light:focus,
a.btn-light:hover,
a.btn-light:focus,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
a.btn-outline-primary:hover,
a.btn-outline-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
a.btn-outline-secondary:hover,
a.btn-outline-secondary:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
a.btn-outline-danger:hover,
a.btn-outline-danger:focus,
.btn-outline-success:hover,
.btn-outline-success:focus,
a.btn-outline-success:hover,
a.btn-outline-success:focus,
.btn-outline-warning:hover,
.btn-outline-warning:focus,
a.btn-outline-warning:hover,
a.btn-outline-warning:focus,
.btn-outline-info:hover,
.btn-outline-info:focus,
a.btn-outline-info:hover,
a.btn-outline-info:focus,
.btn-outline-light:hover,
.btn-outline-light:focus,
a.btn-outline-light:hover,
a.btn-outline-light:focus,
.btn-unhcr-danger:hover,
.btn-unhcr-danger:focus,
a.btn-unhcr-danger:hover,
a.btn-unhcr-danger:focus {
  background: var(--unhcr-blue) !important;
  color: white !important;
  border-color: var(--unhcr-blue) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.12) !important;
  transform: translateY(-1px);
}

.btn:not(.btn-link):not(.btn-close):disabled,
a.btn:not(.btn-link):not(.btn-close):disabled,
.btn-unhcr:disabled,
a.btn-unhcr:disabled,
.btn-unhcr-outline:disabled,
a.btn-unhcr-outline:disabled,
.btn-unhcr-dark:disabled,
a.btn-unhcr-dark:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== GLOBAL BUTTON HARMONIZATION =====
   Make standard Bootstrap buttons visually consistent with the UNHCR style. */
.btn:not(.btn-link):not(.btn-close),
a.btn:not(.btn-link):not(.btn-close) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  box-shadow: 0 1px 2px rgba(11, 55, 84, 0.08);
}

.btn:not(.btn-link):not(.btn-close):hover,
.btn:not(.btn-link):not(.btn-close):focus,
a.btn:not(.btn-link):not(.btn-close):hover,
a.btn:not(.btn-link):not(.btn-close):focus {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary,
a.btn-primary,
.btn-unhcr {
  background: var(--unhcr-blue);
  color: white;
  border: 1px solid var(--unhcr-blue);
}

.btn-primary:hover,
.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus,
.btn-unhcr:hover,
.btn-unhcr:focus {
  background: var(--unhcr-blue-hover);
  color: white;
  border-color: var(--unhcr-blue-hover);
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.14);
}

.btn-outline-primary,
a.btn-outline-primary,
.btn-unhcr-outline {
  background: transparent;
  color: var(--unhcr-blue);
  border: 1px solid var(--unhcr-blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
a.btn-outline-primary:hover,
a.btn-outline-primary:focus,
.btn-unhcr-outline:hover,
.btn-unhcr-outline:focus {
  background: var(--unhcr-blue);
  color: white;
  border-color: var(--unhcr-blue);
  box-shadow: 0 4px 10px rgba(11, 55, 84, 0.12);
}

.btn-secondary,
a.btn-secondary {
  background: var(--unhcr-navy);
  color: white;
  border: 1px solid var(--unhcr-navy);
}

.btn-secondary:hover,
.btn-secondary:focus,
a.btn-secondary:hover,
a.btn-secondary:focus {
  background: var(--unhcr-blue-hover);
  color: white;
  border-color: var(--unhcr-blue-hover);
}

.btn-outline-secondary,
a.btn-outline-secondary {
  background: transparent;
  color: var(--unhcr-navy);
  border: 1px solid var(--unhcr-navy);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
a.btn-outline-secondary:hover,
a.btn-outline-secondary:focus {
  background: var(--unhcr-navy);
  color: white;
  border-color: var(--unhcr-navy);
}

.btn-danger,
a.btn-danger,
.btn-unhcr-danger {
  background: transparent;
  color: var(--unhcr-bordeaux);
  border: 1px solid var(--unhcr-bordeaux);
}

.btn-danger:hover,
.btn-danger:focus,
a.btn-danger:hover,
a.btn-danger:focus,
.btn-unhcr-danger:hover,
.btn-unhcr-danger:focus {
  background: var(--unhcr-bordeaux-hover);
  color: white;
  border-color: var(--unhcr-bordeaux-hover);
}

.btn-outline-danger,
a.btn-outline-danger {
  background: transparent;
  color: var(--unhcr-bordeaux);
  border: 1px solid var(--unhcr-bordeaux);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
a.btn-outline-danger:hover,
a.btn-outline-danger:focus {
  background: var(--unhcr-bordeaux-hover);
  color: white;
  border-color: var(--unhcr-bordeaux-hover);
}

.btn-unhcr-danger-outline,
a.btn-unhcr-danger-outline {
  background: transparent !important;
  color: var(--unhcr-bordeaux) !important;
  border: 1px solid var(--unhcr-bordeaux) !important;
  box-shadow: none !important;
}

.btn-unhcr-danger-outline:hover,
.btn-unhcr-danger-outline:focus,
a.btn-unhcr-danger-outline:hover,
a.btn-unhcr-danger-outline:focus {
  background: var(--unhcr-bordeaux) !important;
  color: white !important;
  border-color: var(--unhcr-bordeaux) !important;
  box-shadow: 0 4px 10px rgba(122, 31, 43, 0.14) !important;
}

.btn-success,
a.btn-success {
  background: var(--unhcr-green);
  color: white;
  border: 1px solid var(--unhcr-green);
}

.btn-success:hover,
.btn-success:focus,
a.btn-success:hover,
a.btn-success:focus {
  background: #2ca06f;
  color: white;
  border-color: #2ca06f;
}

.btn-outline-success,
a.btn-outline-success {
  background: transparent;
  color: var(--unhcr-green);
  border: 1px solid var(--unhcr-green);
}

.btn-outline-success:hover,
.btn-outline-success:focus,
a.btn-outline-success:hover,
a.btn-outline-success:focus {
  background: var(--unhcr-green);
  color: white;
  border-color: var(--unhcr-green);
}

.btn-warning,
a.btn-warning {
  background: var(--unhcr-gold);
  color: var(--unhcr-navy);
  border: 1px solid var(--unhcr-gold);
}

.btn-warning:hover,
.btn-warning:focus,
a.btn-warning:hover,
a.btn-warning:focus {
  background: #e4ad1d;
  color: var(--unhcr-navy);
  border-color: #e4ad1d;
}

.btn-outline-warning,
a.btn-outline-warning {
  background: transparent;
  color: #9a6d00;
  border: 1px solid var(--unhcr-gold);
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
a.btn-outline-warning:hover,
a.btn-outline-warning:focus {
  background: var(--unhcr-gold);
  color: var(--unhcr-navy);
  border-color: var(--unhcr-gold);
}

.btn-info,
a.btn-info {
  background: #2da9d7;
  color: white;
  border: 1px solid #2da9d7;
}

.btn-info:hover,
.btn-info:focus,
a.btn-info:hover,
a.btn-info:focus {
  background: #1587b0;
  color: white;
  border-color: #1587b0;
}

.btn-outline-info,
a.btn-outline-info {
  background: transparent;
  color: #1587b0;
  border: 1px solid #1587b0;
}

.btn-outline-info:hover,
.btn-outline-info:focus,
a.btn-outline-info:hover,
a.btn-outline-info:focus {
  background: #1587b0;
  color: white;
  border-color: #1587b0;
}

.btn-light,
a.btn-light {
  background: white;
  color: var(--unhcr-navy);
  border: 1px solid var(--unhcr-gray-200);
}

.btn-light:hover,
.btn-light:focus,
a.btn-light:hover,
a.btn-light:focus {
  background: var(--unhcr-gray-50);
  color: var(--unhcr-navy);
  border-color: var(--unhcr-gray-300);
}

.btn-outline-light,
a.btn-outline-light {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.7);
}

.btn-outline-light:hover,
.btn-outline-light:focus,
a.btn-outline-light:hover,
a.btn-outline-light:focus {
  background: white;
  color: var(--unhcr-navy);
  border-color: white;
}

.searchable-select {
  position: relative;
}

.searchable-select input {
  width: 100%;
}

.searchable-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 1050;
  background: #fff;
  border: 1px solid var(--unhcr-gray-300);
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.searchable-select-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  color: var(--unhcr-gray-900);
}

.searchable-select-item:hover,
.searchable-select-item:focus {
  background: var(--unhcr-blue-light);
  color: var(--unhcr-navy);
}

/* ===== FORMS ===== */
.form-label-unhcr {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--unhcr-navy);
  margin-bottom: 0.3rem;
  display: block;
}

.form-control-unhcr {
  border: 1px solid var(--unhcr-gray-300);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  display: block;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
}

.form-control-unhcr:focus {
  border-color: var(--unhcr-blue);
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.15);
  outline: none;
}

select.form-control-unhcr {
  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 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

/* ===== MOBILE OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 26, 56, 0.5);
  z-index: 1035;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.show {
  display: block;
}

/* ===== LOADING / EMPTY ===== */
.loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--unhcr-gray-500);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--unhcr-gray-300);
  display: block;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #ffffff;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 3fr 1fr;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #fff;
}

.login-visual-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f7fb 0%, #e8eef4 100%);
}

.login-visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

.login-visual-tint,
.login-visual-copy,
.login-visual-eyebrow {
  display: none;
}

.login-form-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #ffffff;
  padding: 1.25rem 1.75rem 0;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: white;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.login-brand-row {
  padding: 0.75rem 2rem 0.55rem;
  display: flex;
  justify-content: center;
}

.login-brand-lockup {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1rem;
}

.login-brand-logo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.login-brand-logo-cnr {
  max-height: 120px;
}

.login-brand-logo-unhcr {
  max-height: 100px;
}

.login-header {
  padding: 0.15rem 2rem 0.95rem;
  text-align: center;
}

.login-title {
  color: var(--unhcr-navy);
  font-weight: 700;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
  margin: 0 0 0.4rem;
}

.login-subtitle {
  color: var(--unhcr-gray-500);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.45;
}

.login-alert {
  margin: 0 2rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.login-alert-error {
  background: #FFF2F2;
  color: var(--unhcr-red);
  border: 1px solid #FFD6D6;
}

.login-alert-info {
  background: #F0F7FF;
  color: var(--unhcr-blue);
  border: 1px solid #B8DAFF;
}

.login-form {
  padding: 1.1rem 2rem 0.9rem;
}

.login-field {
  margin-bottom: 1rem;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--unhcr-navy);
  margin-bottom: 0.35rem;
}

.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--unhcr-gray-500);
  font-size: 0.9rem;
  pointer-events: none;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem 0.7rem 2.5rem;
  border: 1px solid var(--unhcr-gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.login-input:focus {
  border-color: var(--unhcr-blue);
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.15);
  outline: none;
}

.login-input::placeholder {
  color: var(--unhcr-gray-500);
}

.login-btn {
  width: 100%;
  background: var(--unhcr-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.88rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-family: inherit;
}

.login-btn:hover {
  background: var(--unhcr-blue-hover);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-btn-spinner {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.login-footer {
  padding: 0.85rem 2rem 1rem;
  text-align: center;
}

.login-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--unhcr-gray-500);
}

.login-footer code {
  background: var(--unhcr-gray-100);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--unhcr-gray-700);
}

.login-page-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--unhcr-blue);
  color: white;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

@media (max-width: 1199.98px) {
  .login-shell {
    grid-template-columns: 1.15fr 1fr;
  }
}

@media (max-width: 991.98px) {
  .login-page {
    padding: 0;
    background: #ffffff;
  }

  .login-shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .login-visual-panel {
    min-height: 42vh;
  }

  .login-form-panel {
    padding: 0.9rem 1rem 0;
  }

  .login-card {
    max-width: 560px;
  }
}

@media (max-width: 575.98px) {
  .login-visual-panel {
    min-height: 34vh;
  }

  .login-visual-copy {
  .login-brand-row {
    padding: 0.6rem 1.15rem 0.45rem;
  }

  .login-brand-lockup {
    width: min(380px, 100%);
    gap: 0.75rem;
  }

  .login-brand-logo-cnr {
    max-height: 100px;
  }

  .login-brand-logo-unhcr {
    max-height: 82px;
  }

  .login-header {
    padding: 0.2rem 1.15rem 0.85rem;
  }

  .login-form {
    padding: 0.9rem 1.15rem 0.7rem;
  }

  .login-alert {
    margin: 0 1.15rem;
  }

  .login-footer {
    padding: 0.8rem 1.15rem 1.2rem;
  }

  .login-page-footer {
    position: static;
    margin-top: 0.75rem;
    height: 40px;
    border-radius: 0;
  }

  .login-title {
    font-size: 1.65rem;
  }
}

/* ============================================================
   RESPONSIVE: Tablet (≤992px)
   ============================================================ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .btn-sidebar-toggle {
    display: inline-flex;
  }

  .page-body {
    padding: 1rem;
  }

  .top-nav {
    padding: 0 1rem;
  }

  .kpi-card .kpi-value {
    font-size: 1.5rem;
  }
}

/* ============================================================
   RESPONSIVE: Mobile (≤576px)
   ============================================================ */
@media (max-width: 575.98px) {
  :root {
    --sidebar-width: 280px;
  }

  .page-body {
    padding: 0.75rem;
  }

  .top-nav .page-title {
    font-size: 0.95rem;
  }

  .top-nav-end {
    display: none;
  }

  .kpi-card {
    padding: 1rem;
  }

  .kpi-card .kpi-icon {
    width: 54px;
    height: 54px;
    font-size: 1.65rem;
  }

  .population-profile-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .kpi-card .kpi-value {
    font-size: 1.35rem;
  }

  .kpi-card .kpi-label {
    font-size: 0.7rem;
  }

  .data-card .card-header-custom {
    padding: 0.7rem 0.85rem;
  }

  .data-table th, .data-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .btn-unhcr, .btn-unhcr-outline {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Stack form fields on mobile */
  .row.g-3 {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .row.g-3 > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Make modals full-width on mobile */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
.dashboard-quick-action {
  min-height: 3.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  border-radius: 1rem;
  justify-content: center;
  padding: 0.8rem 1rem;
  line-height: 1.1;
  white-space: normal;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.dashboard-quick-action:hover,
.dashboard-quick-action:focus {
  transform: translateY(-1px);
  box-shadow: 0 0.75rem 1.35rem rgba(15, 23, 42, 0.1);
}

.dashboard-quick-action i {
  font-size: 1rem;
}

.food-page-hero,
.manifest-page-hero {
  margin-bottom: 0.9rem;
}

.food-page-hero h4,
.manifest-page-hero h5,
.food-page-hero .text-muted,
.manifest-page-hero .text-muted {
  font-family: inherit;
}

.food-page-filters-card,
.food-page-list-card,
.food-page-detail-card,
.food-page-form-card,
.food-page-lines-card,
.food-page-beneficiaries-card,
.food-page-kpi-card,
.food-page-actions-card,
.food-page-alerts-card,
.food-page-kpis,
.food-page-empty-card,
.food-page-cancel-card,
.manifest-summary-card,
.manifest-filter-card,
.manifest-list-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.045);
}

.food-page-toolbar .btn-unhcr,
.food-page-toolbar .btn-unhcr-outline {
  min-height: 2.5rem;
  border-radius: 999px;
  padding-inline: 1rem;
}

.food-page-detail-card,
.food-page-form-card,
.food-page-lines-card,
.food-page-beneficiaries-card,
.food-page-kpi-card,
.food-page-empty-card,
.food-page-cancel-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.food-page-filters-card .card-header-custom,
.food-page-list-card .card-header-custom,
.food-page-detail-card .card-header-custom,
.food-page-form-card .card-header-custom,
.food-page-lines-card .card-header-custom,
.food-page-beneficiaries-card .card-header-custom,
.food-page-kpi-card .card-header-custom,
.food-page-actions-card .card-header-custom,
.food-page-alerts-card .card-header-custom,
.manifest-summary-card .card-header-custom,
.manifest-filter-card .card-header-custom,
.manifest-list-card .card-header-custom {
  background: linear-gradient(180deg, rgba(238, 242, 248, 0.96) 0%, rgba(251, 252, 255, 0.99) 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.volrep-summary-card {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 0.45rem 1rem rgba(15, 23, 42, 0.045);
}

.volrep-summary-card .card-header-custom {
  background: linear-gradient(180deg, rgba(238, 242, 248, 0.96) 0%, rgba(251, 252, 255, 0.99) 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.volrep-summary-grid {
  --bs-gutter-x: 0.85rem;
  --bs-gutter-y: 0.85rem;
}

.volrep-summary-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 252, 0.98) 100%);
  box-shadow: 0 0.35rem 0.95rem rgba(15, 23, 42, 0.045);
  padding: 0.95rem 1rem;
}

.volrep-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: #f7f9fb;
  border: 1px solid #d8dde6;
  font-size: 0.78rem;
}

.volrep-summary-panel .kpi-card {
  min-height: 5.9rem;
}

.volrep-summary-panel .fw-semibold {
  color: var(--unhcr-navy);
}

.volrep-summary-panel .border-bottom:last-child {
  border-bottom: 0 !important;
}

.volrep-summary-panel .empty-state {
  padding: 1.5rem 0.5rem;
}

.manifest-summary-grid {
  --bs-gutter-x: 0.85rem;
  --bs-gutter-y: 0.85rem;
}

.manifest-summary-panel {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 252, 0.98) 100%) !important;
  box-shadow: 0 0.35rem 0.95rem rgba(15, 23, 42, 0.045);
}

.manifest-summary-panel .fw-semibold {
  color: var(--unhcr-navy);
}

.manifest-summary-panel .border-bottom:last-child {
  border-bottom: 0 !important;
}

.manifest-summary-panel .text-muted {
  color: var(--unhcr-gray-600) !important;
}

.manifest-summary-panel strong {
  color: #0b2e4f;
}

.food-page-filters-card .card-header-custom h6,
.food-page-list-card .card-header-custom h6,
.food-page-detail-card .card-header-custom h6,
.food-page-form-card .card-header-custom h6,
.food-page-lines-card .card-header-custom h6,
.food-page-beneficiaries-card .card-header-custom h6,
.food-page-kpi-card .card-header-custom h6,
.food-page-actions-card .card-header-custom h6,
.food-page-alerts-card .card-header-custom h6,
.manifest-summary-card .card-header-custom h6,
.manifest-filter-card .card-header-custom h6,
.manifest-list-card .card-header-custom h6 {
  font-size: 0.96rem;
}

.food-page-kpis .kpi-card,
.manifest-summary-card .kpi-card {
  min-height: 6.35rem;
}

.food-page-detail-card .card-header-custom,
.food-page-form-card .card-header-custom,
.food-page-lines-card .card-header-custom,
.food-page-beneficiaries-card .card-header-custom,
.food-page-kpi-card .card-header-custom,
.food-page-cancel-card .card-header-custom {
  padding-bottom: 0.7rem;
}

.food-page-detail-card .p-3,
.food-page-form-card .p-3,
.food-page-lines-card .p-3,
.food-page-beneficiaries-card .p-3,
.food-page-kpi-card .p-3,
.food-page-cancel-card .p-3 {
  padding: 1rem 1.1rem !important;
}

.food-page-empty-card .empty-state {
  padding-block: 3rem;
}

.food-page-cancel-card .btn-unhcr-danger-outline {
  min-height: 2.45rem;
  border-radius: 999px;
}

.food-page-lines-card .scroll-table-10,
.food-page-beneficiaries-card .scroll-table-10,
.food-page-kpi-card .scroll-table-10 {
  margin-top: 0.25rem;
}

.food-page-actions-card .p-3,
.food-page-alerts-card .p-3,
.food-page-filters-card .p-3,
.manifest-summary-card .p-3,
.manifest-filter-card .p-3 {
  padding: 1rem 1.1rem !important;
}

.role-list {
  border-top: 1px solid var(--unhcr-gray-200);
}

.role-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--unhcr-gray-200);
  background: transparent;
  padding: 0.65rem 0.15rem;
  border-radius: 0;
  box-shadow: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.role-row:hover {
  background: rgba(0, 114, 188, 0.04);
}

.role-row-selected,
.role-row-primary {
  background: rgba(0, 114, 188, 0.07);
}

.role-row-text,
.role-row-title,
.role-row-desc,
.role-group-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-row-title {
  white-space: nowrap;
  line-height: 1.2;
}

.role-row-desc,
.role-group-subtitle {
  white-space: nowrap;
  line-height: 1.15;
}

.role-row-desc {
  max-width: 100%;
}

.role-code-badge,
.role-primary-badge {
  white-space: nowrap;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}

.role-summary-card {
  border-left: 3px solid var(--unhcr-blue);
  background: rgba(238, 248, 255, 0.55);
  border-radius: 12px;
}

.role-summary-card .badge {
  font-size: 0.76rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
}

.role-summary-card .fw-semibold {
  color: var(--unhcr-navy);
}

.role-help-card {
  border: 1px solid rgba(0, 98, 171, 0.12);
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(180deg, rgba(240, 248, 255, 0.88) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.role-row .form-check-input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.role-row-meta {
  white-space: nowrap;
}

.role-help-icon {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.role-help-title {
  line-height: 1.15;
  margin-bottom: 0.1rem;
}

.role-help-copy {
  line-height: 1.2;
}

.role-help-card .fw-semibold {
  color: var(--unhcr-navy);
}

@media print {
  .sidebar, .top-nav, .sidebar-overlay, .btn-unhcr, .btn-unhcr-outline {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
  }
  .page-body {
    padding: 0;
  }
  .data-card {
    border: 1px solid #ddd;
    box-shadow: none;
    break-inside: avoid;
  }
}
