/* ============================================
   GLOBAL THEME VARIABLES
============================================ */

:root {
  --app-bg: #1B1D3C;
  --app-border: 1px solid rgba(255, 255, 255, 0.15);

  /* Height of the header bar (approx – used for rail overlay) */
  --header-height: 68px;

  --header-shadow: 0 6px 0px -2px rgba(0, 0, 0, 0.45);
  --sidebar-shadow: 6px 0 5px -2px rgba(0, 0, 0, 0.45);

  --accent: #FFD93D;
  --nav-hover: rgba(255, 255, 255, 0.05);
  --nav-active-bg: rgba(255, 255, 255, 0.08);
}

/* ============================================
   BASE TYPOGRAPHY
============================================ */

body {
  font-weight: 200;
  background: var(--app-bg);
  color: #ffffff;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 { font-weight: 100; }
button, .btn { font-weight: 200; }

/* ============================================
   SIDEBAR (RIGHT SHADOW + RIGHT BORDER)
============================================ */

.sidebar {
  width: 300px;
  height: 100%;              /* 🔹 was 100vh – now matches row height under header */
  background-color: var(--app-bg);
  overflow-y: auto;


  border-right: var(--app-border);
  box-shadow: var(--sidebar-shadow);

  position: relative;
  z-index: 10;

  /* 🔹 lock width on desktop */
  flex: 0 0 300px;

  transition:
    width 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Sidebar logos */

.sidebar-logo-expanded { display: block; }
.sidebar-logo-collapsed { display: none; }

/* Sidebar content bits */

.sidebar .sidebar-icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

.sidebar .sidebar-label { display: inline; }
.sidebar .sidebar-links-nav { display: block; }

/* ============================================
   NAV PILLS
============================================ */

.nav-pills .nav-link {
  background-color: transparent;
  color: #E0E0E0;
  border-radius: 8px;
  padding: 10px 16px;
  transition: all 0.2s ease-in-out;
}

.nav-pills .nav-link:hover {
  background-color: var(--nav-hover);
  color: #FFFFFF;
}

.nav-pills .nav-link.active {
  background-color: var(--nav-active-bg);
  color: #FFFFFF;
  font-weight: 200;
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent);
}

/* ============================================
   RAIL MODE (NARROW)
============================================ */

@media (max-width: 1300px) {
  .sidebar {
    width: 64px;
    flex: 0 0 64px;          /* 🔹 rail width */
    overflow: visible;
    

    border-right: var(--app-border);
    box-shadow: var(--sidebar-shadow);
    /* 🔹 height: 100% is still fine in normal rail state */
  }

  .sidebar:hover {
    width: 300px;
    position: fixed;
    left: 0;
    top: var(--header-height);                /* start under header */
    bottom: 0;                                /* fill to bottom */
    height: auto;                             /* let browser compute exact height */

    border-right: var(--app-border);
    border-top: var(--app-border);
    box-shadow: var(--sidebar-shadow);
    z-index: 9999;                             /* below header (100), above content */
  }

  .sidebar:not(:hover) .sidebar-label,
  .sidebar:not(:hover) .sidebar-links-nav {
    display: none;
  }

  .sidebar:not(:hover) .sidebar-logo-expanded { display: none; }
  .sidebar:not(:hover) .sidebar-logo-collapsed { display: block; }
}

/* ============================================
   HEADER LAYOUT
   - header-sidebar-slot → NO SHADOW, bottom border
   - #app-header → bottom border + bottom shadow
============================================ */

/* Slot above sidebar */

.header-sidebar-slot {
  width: 300px;
  background: var(--app-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: none !important;
  border-bottom: var(--app-border);

  position: relative;
}

/* Rail width for logo slot */

@media (max-width: 1300px) {
  .header-sidebar-slot {
    width: 64px;
  }
}

/* Logos mirror sidebar behaviour */

.header-logo-expanded { height: 40px; }
.header-logo-collapsed { display: none; height: 32px; }

@media (max-width: 1300px) {
  .header-logo-expanded { display: none; }
  .header-logo-collapsed { display: block; }
}

/* ============================================
   HEADER ABOVE CONTENT
============================================ */

#app-header {
  flex-grow: 1;
  display: flex;
  align-items: center;
  background-color: var(--app-bg);
  position: relative;

  z-index: 100;  /* header sits ABOVE sidebar */

  border-bottom: var(--app-border);
  box-shadow: var(--header-shadow);
}

/* ============================================
   TOOLBAR (hamburger etc.)
============================================ */

#header-toolbar { position: relative; }

.header-menu-toggle {
  position: absolute;
  opacity: 0;
}

.header-menu-icon {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-menu-icon span {
  font-size: 20px;
}

.header-menu-panel {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

@media (max-width: 900px) {
  .header-menu-icon { display: flex; }

  .header-menu-panel {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    min-width: 220px;

    background-color: var(--app-bg);
    border-radius: 12px;
    box-shadow: var(--header-shadow);
    z-index: 3000;
  }

  .header-menu-toggle:checked ~ .header-menu-panel {
    display: flex;
  }

  .header-menu-panel > div {
    width: 100%;
  }
}

/* assets/header.css (for example) */

/* Default: desktop toolbar visible, hamburger hidden */
.header-toolbar-desktop {
  display: flex;
}

.header-toolbar-mobile {
  display: none;
}

/* On smaller screens (e.g. < 992px), hide desktop and show hamburger */
@media (max-width: 991.98px) {
  .header-toolbar-desktop {
    display: none !important;
  }

  .header-toolbar-mobile {
    display: flex !important;
  }
}



