/* Desktop left navigation override for the existing compiled application. */
@media (min-width: 769px) {
  .app-layout {
    display: block;
    min-height: 100vh;
  }

  .topbar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: 220px;
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: linear-gradient(180deg, #0d3b69 0%, #082f57 72%, #062947 100%);
    box-shadow: 3px 0 16px rgba(10, 53, 97, 0.14);
  }

  .topbar-logo {
    min-height: 72px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 17px;
    line-height: 1.35;
  }

  .topbar-nav {
    padding: 18px 12px;
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 6px;
  }

  .topbar-nav a {
    min-height: 46px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-radius: 7px;
    color: #dbe9f7;
    font-size: 14px;
    transition:
      background 0.15s ease,
      color 0.15s ease,
      transform 0.15s ease;
  }

  .topbar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(2px);
  }

  .topbar-nav a.active {
    background: linear-gradient(90deg, #286aa8, #3f79ad);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  }

  .topbar-user {
    margin-top: auto;
    padding: 18px 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8f1fa;
  }

  .topbar-user .logout-btn {
    padding: 4px 8px;
    border-radius: 5px;
  }

  .topbar-user .logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .main-content {
    width: auto;
    max-width: none;
    min-height: 100vh;
    margin: 0 0 0 220px;
    padding: 28px 36px 40px;
  }
}

/* Keep the existing compact top navigation on phones and small tablets. */
@media (max-width: 768px) {
  .topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .topbar-logo {
    flex: 1;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .main-content {
    padding: 14px 12px 28px;
  }
}
