/* ==========================================================================
   Vigilus SIEM — Thème Clair Pekhe (Option A)
   Palette Pekhe / Vigilus :
   - Fond principal     : #f8f7fa
   - Surfaces / Cartes  : #ffffff
   - Primaire Vigilus   : #13a3e3 (hover/foncé : #0c7aae)
   - Accent Vigilus     : #c30c29
   - Statuts            : #28c76f (succès), #ff9f43 (alerte), #ff4c51 (danger), #00bad1 (info)
   - Typographie        : Public Sans / sans-serif
   ========================================================================== */

:root {
  --pekhe-bg: #f8f7fa;
  --pekhe-surface: #ffffff;
  --pekhe-primary: #13a3e3;
  --pekhe-primary-dark: #0c7aae;
  --pekhe-accent: #c30c29;
  --pekhe-success: #28c76f;
  --pekhe-warning: #ff9f43;
  --pekhe-danger: #ff4c51;
  --pekhe-info: #00bad1;
  --pekhe-border: #e6e6eb;
  --pekhe-text: #2f2b3d;
  --pekhe-text-muted: #6d6976;
}

html,
body,
.osdAppWrapper,
.euiBody--headerIsFixed,
.euiPage,
.euiPageBody {
  background-color: var(--pekhe-bg) !important;
  color: var(--pekhe-text);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Header & Navigation */
.euiHeader,
.osdHeader {
  background-color: var(--pekhe-surface) !important;
  border-bottom: 1px solid var(--pekhe-border) !important;
  box-shadow: 0 2px 6px rgba(47, 43, 61, 0.05);
}

.euiHeader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pekhe-primary) 0%, var(--pekhe-primary-dark) 75%, var(--pekhe-accent) 100%);
  z-index: 10;
  pointer-events: none;
}

.euiHeaderLogo img,
.euiHeaderLogo svg,
[data-test-subj="logo"] img {
  max-height: 32px !important;
  width: auto !important;
  object-fit: contain;
}

/* Left collapsible nav & drawers */
.euiNavDrawer,
.euiCollapsibleNav {
  background-color: var(--pekhe-surface) !important;
  border-right: 1px solid var(--pekhe-border) !important;
}

.euiListGroupItem__button:hover,
.euiListGroupItem--isActive .euiListGroupItem__button {
  color: var(--pekhe-primary-dark) !important;
  background-color: rgba(19, 163, 227, 0.08) !important;
}

/* Surfaces & Cards */
.euiPanel,
.euiCard,
.embPanel,
.osdWelcomeView {
  background-color: var(--pekhe-surface) !important;
  border-color: var(--pekhe-border) !important;
  border-radius: 8px;
}

.euiPanel--shadowMedium,
.euiCard {
  box-shadow: 0 2px 8px rgba(47, 43, 61, 0.06) !important;
}

/* Buttons & Links */
.euiButton--primary.euiButton--fill,
.euiButton--fill.euiButton--primary {
  background-color: var(--pekhe-primary) !important;
  border-color: var(--pekhe-primary) !important;
  color: #ffffff !important;
}

.euiButton--primary.euiButton--fill:hover,
.euiButton--primary.euiButton--fill:focus {
  background-color: var(--pekhe-primary-dark) !important;
  border-color: var(--pekhe-primary-dark) !important;
}

.euiButton--primary:not(.euiButton--fill) {
  color: var(--pekhe-primary-dark) !important;
  border-color: var(--pekhe-primary) !important;
}

.euiButton--danger.euiButton--fill {
  background-color: var(--pekhe-danger) !important;
  border-color: var(--pekhe-danger) !important;
}

.euiLink--primary,
a.euiLink--primary {
  color: var(--pekhe-primary-dark) !important;
}

.euiLink--primary:hover {
  color: var(--pekhe-primary) !important;
}

/* Status & Health indicators */
.euiHealth--success,
.euiBadge--success {
  color: var(--pekhe-success);
}

.euiHealth--warning,
.euiBadge--warning {
  color: var(--pekhe-warning);
}

.euiHealth--danger,
.euiBadge--danger {
  color: var(--pekhe-danger);
}

/* Focus & Active tabs */
.euiTab.euiTab-isSelected {
  color: var(--pekhe-primary-dark) !important;
  border-bottom-color: var(--pekhe-primary) !important;
}

.euiFieldText:focus,
.euiSelect:focus,
.euiTextArea:focus {
  border-color: var(--pekhe-primary) !important;
  box-shadow: 0 0 0 2px rgba(19, 163, 227, 0.18) !important;
}

/* Loading & Login Logo Sizing */
.osdLoaderWrap .loadingLogo,
.legacyBrowserErrorLogo,
[data-test-subj="login-page"] img {
  max-height: 64px !important;
  width: auto !important;
  object-fit: contain;
}

/* Wazuh Login Screen */
[data-test-subj="login-page"] .euiPanel,
.opensearch-security-login-form {
  border-top: 4px solid var(--pekhe-primary) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(47, 43, 61, 0.08) !important;
}
