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

:root {
  --ghol-blue: #7BCCDF;
  --ghol-red: #D9111E;
  --ghol-black: #1D1D1B;
  --bg: #F7FAFC;
  --card: #FFFFFF;
  --muted: #64748B;
  --border: rgba(226, 232, 240, 0.8);
  --radius-lg: 24px;
  --radius-sm: 14px;
  --radius: 16px;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --font-sans: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ghol-black);
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.kpi-value,
.stat-mini .value,
.v,
.mono,
code {
  font-variant-numeric: tabular-nums;
}

/* --- HEADER & LOGO --- */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.9;
}

/* Logo visible */
.brand img {
  display: block;
  height: 38px;
  width: auto;
  border-radius: 6px;
}

.brand .title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand .title strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ghol-black);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand .title span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- MISE EN PAGE PLEINE LARGEUR --- */
.wrap {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 24px;
}

/* --- RESPONSIVE --- */
@media (max-width: 860px) {
  .topbar-inner {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
  }

  .nav {
    width: 100%;
    overflow: visible;
    padding-bottom: 4px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .brand {
    align-self: flex-start;
  }

  .wrap {
    padding: 0 16px;
    margin-top: 24px;
  }
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
}

.chip {
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.chip:hover {
  background: rgba(123, 204, 223, 0.1);
  color: var(--ghol-blue);
  text-decoration: none;
}

.chip.active {
  background: rgba(123, 204, 223, 0.15);
  color: var(--ghol-blue);
  border-color: rgba(123, 204, 223, 0.2);
}

.chip.red {
  color: var(--ghol-red);
  background: rgba(217, 17, 30, 0.05);
  border-color: rgba(217, 17, 30, 0.1);
}

.chip.red:hover {
  background: rgba(217, 17, 30, 0.1);
  box-shadow: 0 2px 8px rgba(217, 17, 30, 0.15);
}

.dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.6;
}

.chip:hover .dot {
  opacity: 1;
  transform: scale(1.2);
}

h1 {
  font-size: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

h2 {
  font-size: clamp(18px, 3.5vw, 20px);
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(29, 29, 27, 0.9);
}

p {
  margin: 12px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

code {
  font-family: var(--font-mono);
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.08) 0%, rgba(123, 204, 223, 0.04) 100%);
  border: 1px solid rgba(123, 204, 223, 0.15);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--ghol-blue);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card:hover::before {
  transform: scaleY(1);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media(max-width:860px) {
  .grid-2 {
    grid-template-columns: 1fr
  }
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(29, 29, 27, 0.8);
  margin-top: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  color: var(--ghol-black);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

input:hover,
select:hover {
  border-color: rgba(123, 204, 223, 0.4);
  background: #fff;
}

input:focus,
select:focus {
  border-color: rgba(123, 204, 223, 0.8);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(123, 204, 223, 0.12), 0 4px 12px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

input::placeholder {
  color: rgba(100, 116, 139, 0.5);
  font-weight: 400;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

button {
  appearance: none;
  border: none;
  background: var(--ghol-blue);
  color: #0A3540;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

button:hover {
  opacity: 0.9;
}

button:active {
  transform: translateY(1px);
}

button.ghost {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--ghol-black);
  border: 2px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  font-weight: 600;
}

button.ghost:hover {
  background: #fff;
  border-color: rgba(123, 204, 223, 0.4);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.1);
}

button.danger {
  background: linear-gradient(135deg, rgba(217, 17, 30, 1) 0%, rgba(217, 17, 30, 0.85) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 17, 30, 0.35), 0 2px 6px rgba(16, 24, 40, 0.08);
}

button.danger:hover {
  box-shadow: 0 8px 24px rgba(217, 17, 30, 0.45), 0 4px 12px rgba(16, 24, 40, 0.12);
}

.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
  margin: 24px 0;
}

.status {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.12) 0%, rgba(123, 204, 223, 0.06) 100%);
  border: 2px solid rgba(123, 204, 223, 0.3);
  color: #0A3844;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 2px 8px rgba(123, 204, 223, 0.1);
  transition: all 0.25s ease;
}

.status:hover {
  border-color: rgba(123, 204, 223, 0.45);
  box-shadow: 0 4px 12px rgba(123, 204, 223, 0.15);
}

.status.warn {
  background: linear-gradient(135deg, rgba(217, 17, 30, 0.1) 0%, rgba(217, 17, 30, 0.05) 100%);
  border-color: rgba(217, 17, 30, 0.3);
  color: #6B1018;
  box-shadow: 0 2px 8px rgba(217, 17, 30, 0.1);
}

.status.warn:hover {
  border-color: rgba(217, 17, 30, 0.45);
  box-shadow: 0 4px 12px rgba(217, 17, 30, 0.15);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.kv:last-child {
  border-bottom: none;
}

.k {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.v {
  font-weight: 700;
  font-size: 15px;
  color: var(--ghol-black);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  padding: 16px 12px;
  text-align: left;
  font-size: 14px;
  transition: background 0.2s ease;
}

tr:hover td {
  background: rgba(123, 204, 223, 0.03);
}

th {
  color: rgba(29, 29, 27, 0.7);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 12.5px;
  background: rgba(247, 250, 252, 0.5);
  border-bottom: 2px solid rgba(123, 204, 223, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 250, 252, 0.9) 100%);
  transition: all 0.2s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.badge.blue {
  border-color: rgba(123, 204, 223, 0.5);
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.15) 0%, rgba(123, 204, 223, 0.08) 100%);
  color: #0A3844;
}

.badge.red {
  border-color: rgba(217, 17, 30, 0.4);
  background: linear-gradient(135deg, rgba(217, 17, 30, 0.12) 0%, rgba(217, 17, 30, 0.06) 100%);
  color: #6B1018;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}

.pilltag {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 250, 252, 0.9) 100%);
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06);
  transition: all 0.2s ease;
}

.pilltag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
  border-color: rgba(123, 204, 223, 0.5);
}

/* Animations modernes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* Application des animations */
.card {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}

.card:nth-child(2) {
  animation-delay: 0.2s;
}

.card:nth-child(3) {
  animation-delay: 0.3s;
}

.card:nth-child(4) {
  animation-delay: 0.4s;
}

h1 {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.topbar {
  animation: fadeIn 0.4s ease-out;
}

/* Scrollbar personnalisé */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(247, 250, 252, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.4) 0%, rgba(123, 204, 223, 0.25) 100%);
  border-radius: 10px;
  border: 2px solid rgba(247, 250, 252, 0.5);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.6) 0%, rgba(123, 204, 223, 0.4) 100%);
}

/* Responsive amélioré */
@media(max-width:640px) {
  h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 18px;
  }

  .card {
    padding: 20px;
    border-radius: var(--radius);
  }

  button {
    width: 100%;
    justify-content: center;
  }

  .row {
    flex-direction: column;
  }

  .chip {
    font-size: 12.5px;
    padding: 8px 14px;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 12px 8px;
  }
}

/* États de focus améliorés pour accessibilité */
*:focus-visible {
  outline: 3px solid rgba(123, 204, 223, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Selection personnalisée */
::selection {
  background: rgba(123, 204, 223, 0.3);
  color: var(--ghol-black);
}

::-moz-selection {
  background: rgba(123, 204, 223, 0.3);
  color: var(--ghol-black);
}

/* Grille des KPIs (4 colonnes) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 colonnes sur tablette */
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
    /* 1 colonne sur mobile */
  }
}

.kpi-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid #EDF2F7;
}

.kpi-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
}

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 10px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 800;
  margin-top: 5px;
  color: var(--ghol-black);
}

/* Timeline styles */
.timeline-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  padding: 40px 0;
  margin: 32px 0;
}

.timeline-axis {
  position: relative;
  height: 80px;
  background: linear-gradient(90deg, rgba(123, 204, 223, 0.1) 0%, rgba(123, 204, 223, 0.05) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
}

.timeline-point {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ghol-blue);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(123, 204, 223, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 2;
}

.timeline-point:hover {
  transform: scale(1.4);
  box-shadow: 0 4px 16px rgba(123, 204, 223, 0.6);
  z-index: 10;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.view-toggle {
  display: flex;
  gap: 8px;
  background: rgba(247, 250, 252, 0.8);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.view-toggle button {
  padding: 10px 18px;
  border-radius: 10px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.view-toggle button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  color: var(--ghol-blue);
}

.timeline-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-mini {
  background: rgba(247, 250, 252, 0.6);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 232, 240, 0.6);
  text-align: center;
}

.stat-mini .label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-mini .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--ghol-black);
}

/* Search box moderne */
.search-box {
  position: relative;
  margin: 20px 0;
}

.search-box input {
  padding-left: 44px;
  background: rgba(255, 255, 255, 0.95);
}

.search-box::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'><path stroke-linecap='round' stroke-linejoin='round' d='m21 21-4.34-4.34M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  opacity: 0.7;
}

/* Table responsive pleine largeur */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

table {
  min-width: 100%;
}

/* Charts responsifs */
.chart-container {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 24px 0;
}

@media(max-width: 1024px) {
  .chart-container {
    height: 300px;
  }
}

/* Actor colors */
.actor-GHOLP {
  background: rgba(123, 204, 223, 0.8);
  border-color: rgba(123, 204, 223, 1);
}

.actor-GHOL4 {
  background: rgba(217, 17, 30, 0.8);
  border-color: rgba(217, 17, 30, 1);
}

.actor-GHOLTX {
  background: rgba(168, 85, 247, 0.8);
  border-color: rgba(168, 85, 247, 1);
}

.actor-ADJ,
.actor-NYON_LIMOUSINE {
  background: rgba(34, 197, 94, 0.8);
  border-color: rgba(34, 197, 94, 1);
}

/* --- DROPDOWN MENUS --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  appearance: none;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  border: 1px solid transparent !important;
  letter-spacing: 0 !important;
  overflow: visible !important;
}

.nav-dropdown-toggle::before {
  display: none !important;
}

.nav-dropdown-toggle:hover {
  transform: none !important;
  box-shadow: none !important;
  background: rgba(123, 204, 223, 0.1) !important;
  color: var(--ghol-blue) !important;
}

.nav-dropdown-toggle.active {
  background: rgba(123, 204, 223, 0.15) !important;
  color: var(--ghol-blue) !important;
  border-color: rgba(123, 204, 223, 0.2) !important;
}

.dropdown-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.12), 0 2px 8px rgba(16, 24, 40, 0.06);
  z-index: 2000;
  animation: dropdownFadeIn 0.15s ease-out;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-dropdown-item {
  display: block;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: rgba(123, 204, 223, 0.1);
  color: var(--ghol-blue);
}

.nav-dropdown-item.active {
  background: rgba(123, 204, 223, 0.15);
  color: var(--ghol-blue);
}

@media (max-width: 860px) {
  .nav-dropdown-menu {
    left: 0;
    transform: none;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.12), 0 2px 8px rgba(16, 24, 40, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.98);
    padding: 6px;
    animation: dropdownFadeIn 0.15s ease-out;
  }

  .nav-dropdown-menu .nav-dropdown-item {
    font-size: 12.5px;
    padding: 8px 12px;
  }
}

/* --- STANDARDIZED CARD STYLES (light theme) --- */
.route-card,
.stat-card,
.summary-card,
.checkpoint-card,
.route-section {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.route-card:hover,
.route-section:hover {
  border-color: rgba(123, 204, 223, 0.3);
}

/* Standardize text colors for light theme */
.route-title {
  color: var(--ghol-black) !important;
}

.route-meta,
.checkpoint-details,
.time-expected,
.time-window,
.stat-label,
.summary-label,
.auto-refresh {
  color: var(--muted) !important;
}

.checkpoint-title {
  color: var(--ghol-black) !important;
}

/* Filters bar in light theme */
.filters {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
  border-radius: var(--radius-lg) !important;
  padding: 20px !important;
}

.filters select,
.filters input {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--ghol-black) !important;
}

.filters select:focus,
.filters input:focus {
  border-color: rgba(123, 204, 223, 0.8) !important;
  box-shadow: 0 0 0 4px rgba(123, 204, 223, 0.12) !important;
}

.filters label {
  color: var(--muted) !important;
}

/* Checkpoint cards in light theme */
.checkpoint-card {
  background: rgba(247, 250, 252, 0.8) !important;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.checkpoint-card:hover {
  background: rgba(247, 250, 252, 1) !important;
}

.checkpoint-item {
  background: rgba(247, 250, 252, 0.8) !important;
  border: 1px solid rgba(226, 232, 240, 0.5);
}

/* Alert table in light theme */
.alert-table {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
}

.alert-row {
  border-bottom-color: rgba(226, 232, 240, 0.6) !important;
}

.alert-row:hover {
  background: rgba(123, 204, 223, 0.04) !important;
}

.alert-row.header {
  background: rgba(247, 250, 252, 0.9) !important;
  color: var(--muted) !important;
}

/* Badge colors - ensure readability on light backgrounds */
.alert-type-badge,
.status-badge,
.resolved-badge {
  font-weight: 700;
}

.type-MISSING {
  background: rgba(100, 116, 139, 0.15) !important;
  color: #475569 !important;
}

.type-LATE {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
}

.type-EARLY {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
}

.status-active {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
}

.status-inactive {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
}

.resolved-badge {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
}

/* Empty state text in light theme */
.empty-state {
  color: var(--muted) !important;
}

/* Modal form inputs in light theme */
.modal-content {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.2) !important;
}

.modal-content .form-group label {
  color: var(--ghol-black) !important;
}

.modal-content .form-group input,
.modal-content .form-group select {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid rgba(226, 232, 240, 0.8) !important;
  color: var(--ghol-black) !important;
  border-radius: var(--radius-sm) !important;
}

.modal-content .form-group input::placeholder {
  color: var(--muted) !important;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
  border-color: rgba(123, 204, 223, 0.8) !important;
  box-shadow: 0 0 0 4px rgba(123, 204, 223, 0.12) !important;
}

/* Day buttons in light theme */
.day-btn {
  background: rgba(247, 250, 252, 0.8) !important;
  border: 2px solid rgba(226, 232, 240, 0.8) !important;
  color: var(--ghol-black) !important;
}

.day-btn:hover {
  border-color: rgba(123, 204, 223, 0.4) !important;
}

.day-btn.active {
  background: rgba(123, 204, 223, 0.15) !important;
  border-color: var(--ghol-blue) !important;
  color: var(--ghol-blue) !important;
}

/* Checkpoint inline inputs in light theme */
.checkpoint-item input,
.checkpoint-item button {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
  color: var(--ghol-black) !important;
  border-radius: 6px !important;
}

.checkpoint-item input::placeholder {
  color: var(--muted) !important;
}

/* Count badge */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(123, 204, 223, 0.15);
  color: var(--ghol-blue);
  border: 1.5px solid rgba(123, 204, 223, 0.3);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 14px;
  font-weight: 700;
  vertical-align: middle;
}

/* Home page card links */
.card-link {
  text-decoration: none;
  cursor: pointer;
  display: block;
  color: inherit;
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.15), rgba(123, 204, 223, 0.05));
  color: var(--ghol-blue);
}

.card-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

/* SVG icons baseline */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* KPI trend indicators (Financial Dashboard pattern) */
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.kpi-trend.up {
  color: var(--success);
  background: rgba(16, 185, 129, 0.10);
}

.kpi-trend.down {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.10);
}

.kpi-trend.flat {
  color: var(--muted);
  background: rgba(100, 116, 139, 0.08);
}

/* Skeleton loader (uses existing shimmer keyframe) */
.skeleton {
  background: linear-gradient(90deg,
      rgba(226, 232, 240, 0.6) 0%,
      rgba(226, 232, 240, 0.9) 50%,
      rgba(226, 232, 240, 0.6) 100%);
  background-size: 1000px 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 8px;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

/* Live indicator pulse */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: livePulse 2s ease-out infinite;
  margin-right: 6px;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Accessibility: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card,
  .card:hover,
  button:hover,
  .kpi-card:hover,
  .timeline-point:hover,
  .badge:hover,
  .pilltag:hover {
    transform: none !important;
  }

  .live-dot,
  .skeleton {
    animation: none !important;
  }
}

/* Visually hidden (for screen-reader-only labels) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Flatpickr — jours avec passages === */
.flatpickr-day.has-events {
  position: relative;
  font-weight: 700;
  background: linear-gradient(135deg,
      rgba(123, 204, 223, calc(0.18 * var(--event-intensity, 0.5))) 0%,
      rgba(123, 204, 223, calc(0.32 * var(--event-intensity, 0.5))) 100%);
  color: #0A3540;
  border-color: rgba(123, 204, 223, 0.35);
}

.flatpickr-day.has-events:hover {
  background: rgba(123, 204, 223, 0.45);
  color: #0A3540;
  border-color: var(--ghol-blue);
}

.flatpickr-day.has-events.selected,
.flatpickr-day.has-events.startRange,
.flatpickr-day.has-events.endRange {
  background: var(--ghol-blue);
  color: #0A3540;
  border-color: var(--ghol-blue);
}

.flatpickr-day .fp-event-dot {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ghol-blue);
  opacity: calc(0.5 + 0.5 * var(--event-intensity, 0.5));
  pointer-events: none;
}

.flatpickr-day.has-events.selected .fp-event-dot,
.flatpickr-day.has-events.startRange .fp-event-dot,
.flatpickr-day.has-events.endRange .fp-event-dot {
  background: #fff;
  opacity: 1;
}

/* Calendar overall polish (match GHOL light theme) */
.flatpickr-calendar {
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.12) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  font-family: var(--font-sans, system-ui, sans-serif);
}

.flatpickr-day.today {
  border-color: var(--ghol-red);
  color: var(--ghol-red);
}

.flatpickr-day.today.has-events {
  border-color: var(--ghol-red);
  color: var(--ghol-red);
}

/* Legend (optional placement under date inputs) */
.fp-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}

.fp-legend::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(123, 204, 223, 0.3), rgba(123, 204, 223, 0.55));
  border: 1px solid rgba(123, 204, 223, 0.5);
  display: inline-block;
}