  /* ── Topbar sem sidebar ── */
  .topbar {
    left: 0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
  }
  .tabs-bar { left: 0 !important; }
  .main-content { margin-left: 0 !important; }

  /* ── Logo na topbar ── */
  .topbar-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-head); font-weight: 700; font-size: 18px;
    color: var(--primary); text-decoration: none; flex-shrink: 0;
    cursor: pointer;
  }
  .topbar-logo .logo-mark {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800;
  }

  /* ── User na topbar ── */
  .topbar-user {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background .15s;
    position: relative;
  }
  .topbar-user:hover { background: var(--bg-2); }
  .topbar-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 700;
    flex-shrink: 0;
  }
  .topbar-user-info { line-height: 1.2; }
  .topbar-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .topbar-user-role { font-size: 11px; color: var(--text-3); }

  /* ── Empresa badge ── */
  .empresa-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    background: var(--bg-2); border: 1px solid var(--border);
    font-size: 12px; font-weight: 500; color: var(--text-2);
    flex-shrink: 0;
  }

  /* ── Dropdown do usuário na topbar ── */
  .topbar-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.12);
    min-width: 200px; z-index: 500; overflow: hidden;
  }
  
  /* ===== CORREÇÃO MOBILE ===== */
    @media (max-width: 640px) {
      .topbar {
        padding: 0 8px;
        gap: 6px;
      }
    
      /* Esconde texto da logo */
      .topbar-logo span:last-child {
        display: none;
      }
    
      /* Badge empresa: só ícone */
      .empresa-badge span:last-child {
        display: none;
      }
      .empresa-badge {
        padding: 6px 8px;
      }
    
      /* Informações do usuário só avatar */
      .topbar-user-info {
        display: none;
      }
      .topbar-user i.bi-chevron-down {
        display: none;
      }
    
      /* Barra de busca: vira ícone expansível */
      .topbar-search {
        max-width: 36px;
        transition: max-width 0.2s ease;
        flex-shrink: 0;
      }
      .topbar-search.expanded {
        max-width: 180px;
      }
      .topbar-search input {
        opacity: 0;
        pointer-events: none;
        width: 100%;
      }
      .topbar-search.expanded input {
        opacity: 1;
        pointer-events: auto;
      }
      .topbar-search i {
        left: 50%;
        transform: translate(-50%, -50%);
        cursor: pointer;
        z-index: 2;
      }
      .topbar-search.expanded i {
        left: 12px;
        transform: translateY(-50%);
      }
    
      /* Ajuste para o botão de notificações e tema */
      .topbar-actions {
        gap: 2px;
      }
      .topbar-btn {
        width: 32px;
        height: 32px;
      }
    }