/* ==========================================================================
   Fluxo Ideal — Admin Console Theme (Keycloak v2 / PatternFly v4 overrides)
   Palette: neutral #2d3748 · #4a5568 · #f0f2f5
   ========================================================================== */

/* ---------- Global PatternFly variable overrides ---------- */
:root {
  /* Primary colors */
  --pf-global--primary-color--100: #2d3748;
  --pf-global--primary-color--200: #1a202c;
  --pf-global--primary-color--dark-100: #1a202c;

  /* Active / focus */
  --pf-global--active-color--100: #2d3748;
  --pf-global--active-color--200: #1a202c;

  /* Link */
  --pf-global--link--Color: #4a5568;
  --pf-global--link--Color--hover: #2d3748;
  --pf-global--link--Color--dark--100: #4a5568;

  /* Backgrounds */
  --pf-global--BackgroundColor--100: #ffffff;
  --pf-global--BackgroundColor--200: #f0f2f5;
  --pf-global--BackgroundColor--light-100: #f0f2f5;

  /* Font family */
  --pf-global--FontFamily--sans-serif: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Masthead / Page header ---------- */
.pf-c-page__header,
.pf-c-masthead {
  --pf-c-page__header--BackgroundColor: #2d3748;
  --pf-c-masthead--BackgroundColor: #2d3748;
  background-color: #2d3748;
}

.pf-c-page__header .pf-c-brand,
.pf-c-masthead .pf-c-brand {
  max-height: 40px;
}

.pf-c-page__header-tools .pf-c-button,
.pf-c-masthead .pf-c-button {
  color: #ffffff;
}

.pf-c-page__header-tools .pf-c-button:hover,
.pf-c-masthead .pf-c-button:hover {
  color: #e0e0e0;
}

/* ---------- Sidebar / Navigation ---------- */
.pf-c-page__sidebar {
  --pf-c-page__sidebar--BackgroundColor: #ffffff;
  background-color: #ffffff;
}

.pf-c-nav {
  --pf-c-nav__link--Color: #333333;
  --pf-c-nav__link--hover--Color: #2d3748;
  --pf-c-nav__link--m-current--Color: #2d3748;
  --pf-c-nav__link--focus--Color: #2d3748;
}

.pf-c-nav__link.pf-m-current,
.pf-c-nav__link:where(.pf-m-current) {
  color: #2d3748;
  border-left: 3px solid #2d3748;
  background-color: rgba(237, 242, 247, 0.6);
  font-weight: 600;
}

.pf-c-nav__link:hover {
  color: #2d3748;
  background-color: rgba(237, 242, 247, 0.3);
}

.pf-c-nav__section-title {
  color: #4a5568;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ---------- Page content area ---------- */
.pf-c-page__main-section {
  --pf-c-page__main-section--BackgroundColor: #f0f2f5;
  background-color: #f0f2f5;
}

.pf-c-page__main {
  background-color: #f0f2f5;
}

/* ---------- Buttons ---------- */
.pf-c-button.pf-m-primary {
  --pf-c-button--m-primary--BackgroundColor: #2d3748;
  --pf-c-button--m-primary--hover--BackgroundColor: #1a202c;
  --pf-c-button--m-primary--focus--BackgroundColor: #1a202c;
  --pf-c-button--m-primary--active--BackgroundColor: #171923;
  background-color: #2d3748;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.pf-c-button.pf-m-primary:hover {
  background-color: #1a202c;
}

.pf-c-button.pf-m-link {
  --pf-c-button--m-link--Color: #4a5568;
  --pf-c-button--m-link--hover--Color: #2d3748;
  color: #4a5568;
}

.pf-c-button.pf-m-link:hover {
  color: #2d3748;
}

/* ---------- Cards — glassmorphism sutil ---------- */
.pf-c-card {
  --pf-c-card--BackgroundColor: #ffffff;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.pf-c-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.09);
}

/* ---------- Form controls ---------- */
.pf-c-form-control {
  border-radius: 0.5rem;
  border-color: #ccc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pf-c-form-control:focus {
  --pf-c-form-control--focus--BorderBottomColor: #2d3748;
  border-color: #2d3748;
  box-shadow: 0 0 0 1px #2d3748;
  outline: none;
}

/* ---------- Titles ---------- */
.pf-c-content h1,
.pf-c-title.pf-m-xl,
.pf-c-title.pf-m-2xl {
  color: #2d3748;
  font-weight: 700;
}

.pf-c-content h2,
.pf-c-title.pf-m-lg {
  color: #555555;
}

/* ---------- Alerts ---------- */
.pf-c-alert.pf-m-success {
  --pf-c-alert--m-success--BorderTopColor: #2d3748;
}

.pf-c-alert.pf-m-success .pf-c-alert__icon {
  color: #2d3748;
}

/* ---------- Switch / Toggle ---------- */
.pf-c-switch__input:checked ~ .pf-c-switch__toggle {
  --pf-c-switch__input--checked__toggle--BackgroundColor: #2d3748;
  background-color: #2d3748;
}

/* ---------- Dropdown ---------- */
.pf-c-dropdown__toggle:hover,
.pf-c-dropdown__menu-item:hover {
  color: #2d3748;
}

/* ---------- Tabs ---------- */
.pf-c-tabs__link::after {
  border-color: transparent;
}

.pf-c-tabs__item.pf-m-current .pf-c-tabs__link::after,
.pf-c-tabs__link:hover::after {
  border-bottom-color: #2d3748;
}

.pf-c-tabs__item.pf-m-current .pf-c-tabs__link {
  color: #2d3748;
}

/* ---------- Loading screen ---------- */
#app-loading-screen {
  background-color: #f0f2f5 !important;
}

.pf-c-spinner {
  --pf-c-spinner--Color: #2d3748;
}

/* ---------- Table ---------- */
.pf-c-table {
  --pf-c-table--border--BorderColor: #e2e8f0;
}

.pf-c-table thead th {
  color: #555555;
  font-weight: 600;
}

/* ---------- Chip / Badge ---------- */
.pf-c-badge.pf-m-read {
  --pf-c-badge--m-read--BackgroundColor: #e2e8f0;
  color: #555555;
}

.pf-c-badge.pf-m-unread {
  --pf-c-badge--m-unread--BackgroundColor: #2d3748;
  color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .pf-c-page__sidebar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
}

/* ---------- Accessibility: reduced motion ---------- */
@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;
  }
}
