
:root { --fm-amber:#f5b301; --fm-ink:#e8eef8; --fm-muted:#9aa6b8; }

/* Header blur + hide on scroll */
.fm-header {
  position: sticky; top: 0; z-index: 10050 !important;
  transition: transform .28s ease, background .28s ease, box-shadow .28s ease;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.fm-header.fm-hide { transform: translateY(-110%); }
#topnav .navbar-overlay {
  pointer-events: none !important;
  opacity: .55;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#topnav .navbar-custom {
  position: relative; z-index: 2;
  background: rgba(8,12,22,.55) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  pointer-events: auto !important;
}
#topnav .navbar-custom, #topnav .navigation-menu, #topnav a, #topnav button, #topnav input {
  pointer-events: auto !important;
}
#topnav .navigation-menu > li > a,
#topnav .pro-user-name,
#topnav .nav-link { color: #f8fafc !important; }
#topnav .logo-box img.fm-brand {
  filter: none !important;
  max-height: 48px;
  width: auto;
  background: transparent !important;
}
.whiteout img.fm-brand, .whiteout .fm-brand { filter: none !important; }

@media (max-width: 991px) {
  .navigation-menu {
    background: rgba(8,12,24,.94);
    backdrop-filter: blur(16px);
    max-height: 70vh; overflow: auto; z-index: 10060 !important;
  }
  #topnav .logo-box img { height: 36px !important; }
}

/* Contrast: dark system theme */
body.fm-dark, body.fm-dark .wrapper, body.fm-dark .content-page, body.fm-dark .container-fluid {
  color: var(--fm-ink);
}
body.fm-dark .page-title,
body.fm-dark h1, body.fm-dark h2, body.fm-dark h3, body.fm-dark h4, body.fm-dark h5,
body.fm-dark .card-title, body.fm-dark label, body.fm-dark .col-form-label,
body.fm-dark .form-group label, body.fm-dark .text-dark {
  color: #f1f5f9 !important;
}
body.fm-dark .text-muted { color: #94a3b8 !important; }
body.fm-dark .card, body.fm-dark .card-body {
  background-color: rgba(17,24,39,.82) !important;
  color: #e5e7eb !important;
}
body.fm-dark .form-control, body.fm-dark .select2-container .select2-selection {
  background-color: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #334155 !important;
}
body.fm-dark .table, body.fm-dark .table td, body.fm-dark .table th { color: #e5e7eb !important; }
body.fm-dark .breadcrumb, body.fm-dark .page-title-box { color: #e5e7eb; }

/* Contrast: light system theme */
body.fm-light .page-title, body.fm-light label, body.fm-light .col-form-label { color: #0f172a !important; }
body.fm-light .card { background: #fff; color: #0f172a; }
body.fm-light .form-control { background: #fff; color: #0f172a; }

/* Login */
.login-container { background: #070b16; }
.video-overlay {
  background: linear-gradient(120deg, rgba(7,11,22,.4), rgba(245,179,1,.16), rgba(7,11,22,.7)) !important;
  pointer-events: none;
}
.login-section { background: radial-gradient(circle at top,#141a2e 0%,#070b16 55%) !important; }
.login-content { background: transparent !important; }
.login-form .card { background: rgba(12,16,32,.72) !important; border: 1px solid rgba(245,179,1,.22) !important; }
.login-form .form-control { background: rgba(255,255,255,.06) !important; color: #fff !important; }
.login-btn { background: linear-gradient(135deg,#f5b301,#ff7a18) !important; color: #111 !important; }
.login-title { color: #f5b301 !important; }
.login-subtitle, .login-form label { color: #e5e7eb !important; }

.fm-swatch { display:inline-flex; align-items:center; gap:8px; margin:0 8px 10px 0; cursor:pointer; }
.fm-swatch i { width:22px; height:22px; border-radius:50%; display:inline-block; border:2px solid #fff3; }
.fm-code { background:#111827; color:#e5e7eb; padding:12px 14px; border-radius:8px; overflow:auto; font-size:13px; }


/* Fecha a faixa preta no mobile */
#topnav.fm-header {
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  overflow: visible !important;
  background: transparent !important;
}
#topnav .navbar-overlay {
  position: absolute !important;
  top: 0; left: 0; right: 0;
  height: 70px !important;
  max-height: 70px !important;
}
#topnav .navbar-custom {
  height: 70px !important;
  min-height: 70px !important;
}
body.fm-light {
  background: #eef2f7 !important;
}
body.fm-dark {
  background: #0b1220 !important;
}
.wrapper, .boxed-layout, .boxed-layout-ext {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background: transparent !important;
}
.page-title-box { min-height: 0 !important; padding-top: 12px !important; }
@media (max-width: 991px) {
  #topnav .navigation-menu {
    position: absolute !important;
    top: 70px !important;
    left: 0; right: 0;
    width: 100%;
  }
  .wrapper { padding-top: 0 !important; }
}
