/* =============================================================
   THC-FMS  —  Horizontal Top Navigation
   Clean Navy Blue & White Color Theme
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('modern_theme.css');

/* ---- Navy Blue & White Theme Variables ---------------------- */
:root {
  --thc-navy-dark:  #001D39;
  --thc-navy-main:  #001D39;
  --thc-navy-light: #0A4174;
  --thc-navy-hover: #49769F;
  --thc-white:      #ffffff;
  --thc-white-muted:#d0dded;
  --thc-white-dim:  #7BBDE8;
  --thc-border:     rgba(255, 255, 255, 0.15);
  --thc-border-strong: #7BBDE8;
  --thc-nav-h:      60px;
  --thc-drop-bg:    #001D39;
  --thc-radius:     8px;
  --thc-shadow:     0 8px 24px rgba(0, 29, 57, 0.3);
  --thc-font:       'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Reset body for top-navbar layout ----------------------- */
body {
  font-family: var(--thc-font) !important;
  padding-top: calc(var(--thc-nav-h) + 0px) !important;
}

/* Hide the original Limitless sidebar so we don't double-show */
.sidebar.sidebar-dark.sidebar-main,
.sidebar-mobile-toggler,
.navbar.navbar-expand-md.navbar-light {
  display: none !important;
}

.content-wrapper,
.page-content {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* ---- Main Navbar Shell -------------------------------------- */
.thc-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  height: var(--thc-nav-h);
  background: var(--thc-navy-main);
  border-bottom: 2px solid var(--thc-navy-dark);
  box-shadow: var(--thc-shadow);
  font-family: var(--thc-font);
}

.thc-topnav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  max-width: 100%;
  gap: 0;
}

/* ---- Brand Logo --------------------------------------------- */
.thc-topnav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 20px;
  flex-shrink: 0;
  padding: 4px 0;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.3));
}

/* ---- Nav lists ---------------------------------------------- */
.thc-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
  height: 100%;
  flex: 1;
}

.thc-nav-right {
  flex: 0;
  margin-left: auto;
}

/* ---- Nav items ---------------------------------------------- */
.thc-nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

/* ---- Nav links ---------------------------------------------- */
.thc-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  color: var(--thc-white-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.thc-nav-link i {
  font-size: 14px;
  color: var(--thc-white-muted);
}

.thc-nav-link .thc-arrow {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
  transition: transform 0.2s;
}

.thc-nav-link:hover {
  color: var(--thc-white);
  background: var(--thc-navy-light);
  text-decoration: none;
}

.thc-nav-link:hover i {
  color: var(--thc-white);
}

.thc-nav-link.active {
  color: var(--thc-white);
  font-weight: 600;
  background: var(--thc-navy-light);
  border-bottom-color: var(--thc-white);
}

.thc-nav-link.active i {
  color: var(--thc-white);
}

.thc-has-dropdown.open > .thc-nav-link {
  color: var(--thc-white);
  background: var(--thc-navy-light);
  border-bottom-color: var(--thc-white);
}

.thc-has-dropdown.open > .thc-nav-link .thc-arrow {
  transform: rotate(180deg);
}

/* ---- Dropdown menus ----------------------------------------- */
.thc-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  min-width: 230px;
  background: var(--thc-drop-bg);
  border: 1px solid var(--thc-navy-light);
  border-top: 2px solid var(--thc-white);
  border-radius: 0 0 var(--thc-radius) var(--thc-radius);
  box-shadow: var(--thc-shadow);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 1100;
  animation: thcDropIn 0.15s ease;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}

.thc-dropdown-right {
  left: auto;
  right: 0;
}

@keyframes thcDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.thc-has-dropdown.open > .thc-dropdown {
  display: block;
}

/* Dropdown items */
.thc-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--thc-white-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.thc-dropdown li a i {
  font-size: 13px;
  color: var(--thc-white-dim);
  width: 16px;
  text-align: center;
}

.thc-dropdown li a:hover {
  background: var(--thc-navy-hover);
  color: var(--thc-white);
}

.thc-dropdown li a:hover i {
  color: var(--thc-white);
}

.thc-dropdown li a.active {
  background: var(--thc-navy-hover);
  color: var(--thc-white);
  font-weight: 600;
  border-left: 3px solid var(--thc-white);
}

.thc-dropdown li a.active i {
  color: var(--thc-white);
}

/* Section headers in dropdown */
.thc-dropdown-section-header {
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--thc-white-dim);
  border-top: 1px solid var(--thc-border);
  margin-top: 4px;
}

.thc-dropdown-section-header:first-child {
  border-top: none;
  margin-top: 0;
}

/* Divider */
.thc-divider {
  height: 1px;
  background: var(--thc-border);
  margin: 4px 0;
}

/* ---- User button -------------------------------------------- */
.thc-user-btn {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.thc-username {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--thc-white);
}

/* ---- Mobile hamburger --------------------------------------- */
.thc-topnav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 0;
}

.thc-topnav-toggle span {
  display: block;
  height: 2px;
  background: var(--thc-white);
  border-radius: 2px;
  transition: 0.2s;
}

/* ---- Scrollbar in dropdown ---------------------------------- */
.thc-dropdown::-webkit-scrollbar { width: 4px; }
.thc-dropdown::-webkit-scrollbar-track { background: transparent; }
.thc-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }

/* ---- Responsive -------------------------------------------- */
@media (max-width: 992px) {
  .thc-topnav-toggle { display: flex; }

  .thc-nav {
    display: none;
    position: fixed;
    top: var(--thc-nav-h);
    left: 0; right: 0;
    background: var(--thc-navy-dark);
    flex-direction: column;
    height: auto;
    max-height: calc(100vh - var(--thc-nav-h));
    overflow-y: auto;
    border-bottom: 2px solid var(--thc-navy-main);
    padding: 8px 0;
    z-index: 1049;
  }

  .thc-nav.open { display: flex; }
  .thc-nav-right { display: none; }

  .thc-nav-item { height: auto; width: 100%; flex-direction: column; align-items: flex-start; }

  .thc-nav-link {
    width: 100%;
    height: auto;
    padding: 12px 20px;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .thc-nav-link.active {
    border-left-color: var(--thc-white);
    border-bottom: none;
  }

  .thc-dropdown {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(0,0,0,0.25);
    animation: none;
    max-height: none;
  }

  .thc-has-dropdown.open > .thc-dropdown { display: block; }

  .thc-dropdown li a { padding: 10px 36px; }
}
