/* ============================================
   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 (RIGHT SHADOW + RIGHT BORDER)
============================================ */

.sidebar {
  width: 64px;
  height: 100%;
  background-color: var(--app-bg);
  overflow: visible;

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

  position: relative;
  z-index: 10;

  flex: 0 0 64px;

  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Sidebar expanded (open) */
.sidebar.sidebar-open {
  width: 300px;
  flex: 0 0 300px;
  overflow: hidden;
}

/* Sidebar logos */

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

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

/* Sidebar content bits */

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

.sidebar .sidebar-label { display: none; opacity: 0; transition: opacity 0.2s ease 0.1s; }
.sidebar .sidebar-links-nav { display: none; opacity: 0; transition: opacity 0.2s ease 0.1s; }

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

/* Toggle button */
.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 10px 0 6px 0;
  margin-left: -6px;
  cursor: pointer;
  width: 64px;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  opacity: 0.7;
}

.sidebar.sidebar-open .sidebar-toggle-btn {
  justify-content: flex-end;
  width: 100%;
  padding: 10px 12px 6px;
}

/* ============================================
   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: no longer needed — handled by base .sidebar (64px)
   and .sidebar.sidebar-open (300px) at any screen size
============================================ */

@media (max-width: 600px) {
  .sidebar.sidebar-open {
    width: 100vw;
    flex: 0 0 100vw;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    z-index: 9999;
    transform: translateX(0);
    transition:
      transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar:not(.sidebar-open) {
    transform: translateX(0);
  }

  .tabs-stackable {
    flex-wrap: wrap;
  }
  .tabs-stackable .nav-item {
    flex: 1 1 100%;
  }
  .tabs-stackable .nav-link {
    width: 100%;
    text-align: center;
  }
}

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

/* Slot above sidebar */

.header-sidebar-slot {
  width: 64px;
  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;
  transition: width 0.25s ease;
}

.header-sidebar-slot.header-sidebar-open {
  width: 300px;
}

/* Logos mirror sidebar behaviour */

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

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

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

/* ── home-page-rail: marker class for home page sidebar ── */
/* Collapse/expand handled by .sidebar-collapsed class */

/* ============================================
   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;
  }
}



